cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Slow connect time when doing a file upload.

From: Barry Leslie <Barry.Leslie_at_primebase.com>
Date: Wed, 03 Mar 2010 07:42:43 -0800

On 3/3/10 4:09 AM, "Daniel Stenberg" <daniel_at_haxx.se> wrote:

> On Tue, 2 Mar 2010, Barry Leslie wrote:
>
>> When using curl or libcurl to upload a file there seems to be a 2 second
>> pause after connecting before the upload starts.
>>
>> I am using curl 7.16.3 on OS X 10.5.8 PPC.
>
> That's a very old curl version. You may just suffer from an acient bug we've
> fixed since.
>
>> curl --upload-file afile "http://osx:8080/test"
>>
>> It will take 2+ seconds, the size of the file doesn't matter.
>
> I would guess it's due to it waiting for a 100 Continue response, but I'm
> not sure.

Yes, this is the problem. The server is not responding to the HTTP 'Expect:
100-Continue" header. If you just send a string then curl does not send the
header separately and so there is no delay.

I will need to fix this in my server.

Thanks,
    Barry

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-03