cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Size of chunks in chunked uploads

From: Apurva Mehta <apurva_at_mathmeth.com>
Date: Fri, 1 May 2009 12:17:29 -0700

>> (1) What about the command-line curl utility? I notice that when I use it
>> to upload large files using chunked encoding, the server receives 128 byte
>> chunks. For the same file uploaded to the same server without chunked
>> encoding, the server receives the data in 4000 byte segments. (This is an
>> apache webserver and a I get these numbers because I have a custom apache
>> module handling these uploads.) This is what lead me to believe that there
>> is some implicit default value for the chunk size.
>
> I have no explanation for that. 'curl' has the exact same read function for
> doing the read from a file so it should provide data in the exact same
> way/pattern independently of chunked or not.

Just an update. I don't think that the problem is with curl. I did an
strace on the curl process doing the chunked upload, and it is clear
that it sending variable sized chunks in sizes much larger than 128
bytes. Something else along the way is causing our server to see only
128 byte segments.

Thanks a lot for answering my questions. I appreciate it.

Apurva
Received on 2009-05-01