cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl, squid proxy, failing multipart post

From: <man_at_tfhs.net>
Date: Wed, 11 May 2005 18:31:17 -0000

>> transfer.c, line 288 calls Curl_select(). curl select returns 4 (error). the
>> code below line 288 only looks for the lowest two bits of the return (read
>> and write). it does nothing with the error at all.
>
> Gosh!
>
>> it also appears to have done nothing with the results it has read thusfar
>> from the server, so it does not notice the 407?
>
> It takes care of all incoming data the usual way. What makes you think it
> "have done nothing" ?

purely my lack of understanding the code. i see a bit more now, and can
say that the function Curl_http_auth_act() is getting called, and does
change the conn struct to indicate that the connect is over and the newurl
should be used. but, the code continues and runs the if((k->keepon &
KEEP_WRITE) && (select_res & CSELECT_OUT)){}, which attempts a write on
the closed connect.

perhaps at the time that the auth code says i should use a different url,
we could rewind and break out of this loop, or should we return to the
caller? i do not see exactly where the re-transmit with auth happens
currently...

and yes, this does look like a mine field.

allan
Received on 2005-05-11