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

No content length on DELETE and OPTIONS #1343

Open
ronag opened this issue May 26, 2019 · 1 comment
Open

No content length on DELETE and OPTIONS #1343

ronag opened this issue May 26, 2019 · 1 comment

Comments

@ronag
Copy link

ronag commented May 26, 2019

I'm trying to sort out a supposed NodeJS workaround in regards to DELETE and OPTIONS requests.

The workaround was introduced here (8a24a1e) with a description.

I've created an issue (nodejs/node#27880) on the NodeJS repo. However, it currently seems that node-http-proxy is doing it wrong.

Since I don't quite understand why this workaround was introduced and what exact scenario it is supposed to fix I am unable to argue the case.

Would someone like to help out? Would be nice to remove the workaround either through a fix in NodeJS or a realisation that it is not required.

ping @jugglinmike

@awwright
Copy link

I haven't used node-http-proxy, but I would like to say it does appear that Node.js is to blame after all.

My advice would be to follow the HTTP/1.1 instructions for calculating the message body length of the request. Then, depending on the result, specifically set or remove the Transfer-Coding and the Content-Length headers; do not allow Node.js to set defaults.

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

No branches or pull requests

2 participants