Bug in inets HTTP Client w/ Chunked Encoding

Dave Smith dizzyd@REDACTED
Wed Sep 23 19:52:23 CEST 2009


Could someone on the OTP team confirm that this is actually a bug or
no? I hate seeing so many crashes in my error logs and would prefer
not to have to depend on HTTP clients other than inets (from a
packaging standpoint).

Thanks. :)

D.

On Tue, Sep 8, 2009 at 8:56 AM, Dave Smith <dizzyd@REDACTED> wrote:
> Argh...I failed basic training of bug reporting apparently...
>
> O/S Platform: OS X 10.6 and 10.5
> Erlang Version: R13B01 (64 and 32-bit versions)
>
> D.
>
> On Tue, Sep 8, 2009 at 8:53 AM, Dave Smith <dizzyd@REDACTED> wrote:
>> Greetings,
>>
>> I stumbled across what I believe to be a bug in the inets HTTP client,
>> when used with HTTP chunked encoding and having the client save
>> directly to a file. The distilled test case is attached.
>>
>> From my reading of the client source code, it looks like there is a
>> rather severe impedance mismatch between the httpc_handler and
>> http_chunk modules. The http_chunk modules correctly decodes the
>> chunks and calls back into httpc_manager:stream, but then fails to
>> pass the modified HTTP request back out on completion. It's not clear
>> to me exactly how one would fix this without a fair bit of rework.
>>
>> Of note, it's possible to work around the failure by having the
>> library stream the chunks to the calling process. However, it's kinda
>> of silly to have to do that when the HTTP client provides a feature
>> for this very use case.
>>
>> Please let me know if I can do anything to further elucidate this bug.
>>
>> D.
>>
>


More information about the erlang-questions mailing list