Bug in inets HTTP Client w/ Chunked Encoding

Dave Smith dizzyd@REDACTED
Tue Sep 8 16:53:08 CEST 2009


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpc_bug.erl
Type: application/octet-stream
Size: 882 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090908/bac28db5/attachment.obj>

More information about the erlang-questions mailing list