cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Delay in HTTP PUT and a SOLUTION

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 17 Sep 2008 09:19:04 -0700

On Wed, Sep 17, 2008 at 03:19:38PM +1000, rodney_at_optimail.com.au wrote:
> and for PUT:
>
> curl -v -H 'Content-Type: application/xml; charset=utf-8' -T tst.xml
> http://127.0.0.1:8000/xml/book/3
>
> Analysis of the messages using tshark showed that curl was splitting up
> the message sent, with 1 second delay on the curl side. The second part of
> the message was the file contents, 289 bytes in this case. Trace is
> appended.

What happens is that curl sends an Expect: 100-continue header in some
cases, like all PUTs, and waits one second for a 100 Continue response.
On a high latency link or a HTTP 1.0 server, this won't come in time and
curl will just send the data eventually anyway. The right way to stop
this behaviour is to override the continue wait with
-H Expect: or -0

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-09-17