curl-library
Re: HTTP behavior with data > 1024 bytes
Date: Mon, 11 Feb 2008 21:45:33 +0100 (CET)
On Mon, 11 Feb 2008, Florian.PONROY_at_fr.thalesgroup.com wrote:
> However, when there are more than 1024 bytes of data to send, the HTTP
> header is sent first, then the POST data. I explicitely deactivated the
> "Expect: 100-continue" header field, since some of our server implementation
> does not support it (thus leading to a 2 seconds timeout between each send,
> which is not acceptable).
Well, your server is being silly then since it should respond with a
100-continue faster than two seconds (in a typical low-latency network). But
there are two ways you can alter this effect:
CURLOPT_TCP_NODELAY and making libcurl skip the Expect: header with
CURLOPT_HTTPHEADER.
> So (at last!) my question is: is there a way to POST a more than 1024 bytes
> message in a single shot, without using the Expect: 100-continue?
Yes, when not using Expect: libcurl will cram more into the first package. Up
to 60K iirc.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2008-02-11