cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Error about chunky parser

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 21 Jan 2003 19:04:56 +0100 (CET)

On Tue, 21 Jan 2003, Brad Settlemyer wrote:

> With the help of a guy at work, I've been able to use telnet to simulate a
> correct post to this ip and port, and I think Curl must be being very picky
> about something.

Of course I can't rule that out, or that there's a bug in curl, but since the
day I added the content decoding code in curl I have *never* gotten any
reports on this being picky (I added this almost 2 years ago)! This make me
suspect that the problem is not in the receiving end...

> The connection is not sending a NULL to indicate the end of the chunked
> response, rather it is simply closing the connection.

Neither NULL nor just closing the connection is the correct way to end a
chunked transfer.

> According to my coworker, this corresponds to the rfc and is allowable.

Can you please ask your coworker exactly what parts of RFC2616 section 3.6.1
that allows this?

In my view, and I re-read this now again just to be sure, it pretty clearly
defines that there must be a "last-chunk" in a chunked-body, and that
last-chunk is:

       last-chunk = 1*("0") [ chunk-extension ] CRLF

> Can someone help me configure CURL to work with this type of response as
> well (chunked and terminated by a closed connection).

I would rather first have you show us exactly how the data stream looks, and
then check one more time why your server sends you this weirdness.

I honestly can't see how we'd be making anyone any services by accepting a
broken download as if it wasn't broken.

Please prove me wrong if I am.

[from the other mail:]

> Thanks for the response, here is my new error message:
> curl: (56) Received problem 2 in the chunky parser

Ah, the CHUNKE_ILLEGAL_HEX error code.

libcurl didn't find a (single) hexadecimal digit where there was supposed to
be (at least) one in the chunked stream.

This indicates that the stream was malformated, not just ending prematurely.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
Received on 2003-01-21