cURL / Mailing Lists / curl-library / Single Mail


Re: libcurl, squid proxy, failing multipart post

From: <>
Date: Fri, 6 May 2005 23:27:15 -0000

On Fri, May 6, 2005, Daniel Stenberg <> said:

> On Fri, 6 May 2005 wrote:
>> i have found that i never have the problem if the verbosity level in libcurl
>> is 0. if it is turned up to 1, then i get the hanging 9 times out of 10. i
>> wonder if both libcurl and squid are waiting a certain amount of time after
>> the post header for the body to come across, and sometimes one vs the other
>> 'wins' ?
> libcurl doesn't wait for anything when Expect: 100-continue isn't used, it
> just performs. I guess the added verbose thing makes things go a tad bit
> slower than thus more likely to face the situation when the server/proxy
> closes the connection before the POST is completed.

that would jive with my experience. squid must have a very short internal
timeout that it waits before sending 407 response, and if libcurl gets the
next packet there first, then squid just accepts the entire post body. if
not, it sends the 407 and the FIN, which libcurl fails to handle ATM.

> Any chance you can add some debug code or something to the Curl_read() and
> Curl_write() functoons (in lib/sendf.c)? I would very much like to know what
> happens on that level when the connection is "dropped" from the server-side.
> I would assume (if this bug wouldn't manifest) that the swrite() call within
> Curl_write() returns -1 and that errno (what Curl_ourerrno() returns) contains
> ECONNRESET or similar...

no problem. first thing on monday. i may need some guidance once i am
looking at the code, though.

thanks for your help, and the great software.

Received on 2005-05-07