[erlang-patches] HTTP PUT/POST fail when content-length is zero

Carl Meijer hammingweight@REDACTED
Sat Mar 2 06:17:49 CET 2013


Hi,

The content-length header is removed from PUTs/POSTs when the length
is zero. Servers are rejecting PUTs/POSTs without the content length
with a 411 response code

RFC2616 states that a content length of zero is valid.

I have added a test for this bug. I am not sure that I have added it
to the correct suite (http_format_SUITE) but it does demonstrate the
problem and that the proposed fix solves this problem (no tests in the
inets suite break as a result of the change).

git fetch git://github.com/hammingweight/otp.git bug-http-content-length-zero

https://github.com/hammingweight/otp/compare/bug-http-content-length-zero

https://github.com/hammingweight/otp/compare/bug-http-content-length-zero.patch

Regards,
Carl



More information about the erlang-patches mailing list