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

Carl Meijer hammingweight@REDACTED
Wed Mar 13 10:13:11 CET 2013


On Mon, Mar 4, 2013 at 11:16 AM, Fredrik <fredrik@REDACTED> wrote:
> On 03/02/2013 06:17 AM, Carl Meijer wrote:
>>
>> 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
>> _______________________________________________
>> erlang-patches mailing list
>> erlang-patches@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-patches
>
> Hello Carl,
> I've fetched your patch and it is currently cooking in the 'pu' branch.
> May be a duplicate patch on this matter but I'll look into it.
Hi,

I was wondering whether there was a duplicate patch for this issue?

I see there is some other issue with content-length = 0 but that seems
to be in the headers of HTTP responses (not in the headers of HTTP
requests).

BR,
Carl



More information about the erlang-patches mailing list