Skip to content

Error: Can't set headers after they are sent when using file handlebar in docker container #249

@jimpanzeeee

Description

@jimpanzeeee

Describe the bug
When using file handlebar with docker camouflage a "Error: Can't set headers after they are sent" occurs instead of the file being served.

To Reproduce
Steps to reproduce the behavior:

  1. Mock File Content
HTTP/1.1 200 OK
Content-Type: image/png

{{file path="./files/mr_man.png"}}
  1. Folder Structure camouflage/mocks/aws/s3/student-plans/GET.mock
  2. Error Stack Trace
camouflage                  | Error: Can't set headers after they are sent.
camouflage                  |     at SendStream.headersAlreadySent (/usr/local/lib/node_modules/camouflage-server/node_modules/send/index.js:386:13)
camouflage                  |     at SendStream.send (/usr/local/lib/node_modules/camouflage-server/node_modules/send/index.js:613:10)
camouflage                  |     at onstat (/usr/local/lib/node_modules/camouflage-server/node_modules/send/index.js:725:10)
camouflage                  |     at FSReqCallback.oncomplete (node:fs:199:5)

Expected behavior
The file is served.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [macOS Ventura 13.3]
  • Browser [Using postman not a browser]
  • Version [Not sure what version I am meant to put here]

Additional context
Attach camouflage.log file

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions