Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_HTTP_HEADERS_SENT when setting parseReqBody=true #487

Open
AmolM27 opened this issue Aug 4, 2021 · 1 comment
Open

ERR_HTTP_HEADERS_SENT when setting parseReqBody=true #487

AmolM27 opened this issue Aug 4, 2021 · 1 comment
Labels

Comments

@AmolM27
Copy link

AmolM27 commented Aug 4, 2021

I need to change the filename in multipart form-data request in the proxy. The moment, I simply add: parseReqBody=true it fails with error:

'Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ClientRequest.setHeader (_http_outgoing.js:518:11)'

I need that to be true in order to change bodycontent in proxyReqBodyDecorator. If I set parseReqBody=false it does not error 'ERR_HTTP_HEADERS_SENT' but bodycontent is empty.

@monkpow
Copy link
Collaborator

monkpow commented Sep 11, 2023

Can you post a more detailed example of your setup? I'd be happy to look at this, but can't easily reproduce it from your description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants