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

Do not use "Transfer-Encoding: chunked" header for proxied DELETE requests (again) #960

Closed
Turbo87 opened this issue Feb 13, 2016 · 1 comment · Fixed by #961
Closed

Comments

@Turbo87
Copy link
Contributor

Turbo87 commented Feb 13, 2016

This issue is related to PR #373 where this exact bug was already fixed by a89e2f2, but then later apparently introduced again by 8663ac1.

The actual problem is that DELETE requests with both Content-Length: 0 and Transfer-Encoding: chunked are illegal and are being rejected by some servers (in this case nodejs since v0.10.42). If the incoming request only has the Transfer-Encoding header the proxy will somehow automatically set the Content-Length header to 0 but won't remove the encoding header which leads to this issue.

Turbo87 added a commit to Turbo87/ember-cli that referenced this issue Feb 13, 2016
node v0.10.42 is rejecting DELETE requests with both Content-Length: 0 and
Transfer-Encoding: chunked headers. We can force Content-Length: 0 to work
around the problem.

see http-party/node-http-proxy#960
and ladjs/superagent#236
@jcrugzz
Copy link
Contributor

jcrugzz commented Feb 13, 2016

@Turbo87 looks like this was lost in translation when the rewrite happened. I'd love PR for this 👍. Definitely a good first contributor issue :)

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

Successfully merging a pull request may close this issue.

2 participants