cURL / Mailing Lists / curl-library / Single Mail

curl-library

chunked uploads aren't working

From: <RBramante_at_on.com>
Date: Tue, 27 Jan 2004 10:03:34 -0500

I'm in the process of upgrading from 7.9.8 to 7.11 and it looks to me like
chunked uploads do not work as curl is not sending the terminating chunk.

That is, from 2616 "The chunked encoding is ended by any chunk whose size
is zero, followed by the trailer, which is terminated by an empty line."

So, for example, sending the data "abcdefghijklmnopqrstuvwxyz":

curl sends this:

0000 3161 0d0a 6162 6364 ..1a..abcd
6566 6768 696a 6b6c 6d6e 6f70 7172 7374 efghijklmnopqrst
7576 7778 797a 0d0a uvwxyz..

There is no terminating zero chunk to signal to the server that the
transfer is complete. This is causing Tomcat to hang on uploads
until either the client or server timesout.

The fix is for curl to write the terminating chunk once the user's read
callback returns 0, i.e. something like (I think this is right)

00 00 00 60 0d 0a 0d 0a

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-27