curl-library
Re: Curl retry without notifying application?
Date: Sat, 29 Aug 2009 22:17:48 +0200 (CEST)
On Thu, 27 Aug 2009, Mark Aldred wrote:
> I issue a PUT request of 128kb. The server sends to 100/continue. Curl
> invokes my CURLOPT_READFUNCTION 5 times. Four invocations to copy all the
> data and my function returns 0 on the last invocation signaling there is no
> more data. Curl then encounters the SSL read error shown above. As far as
> I can tell curl has not yet transmitted any data to the server, but I'm not
> sure if that is relevant to my issue.
I think it is relevant only in the sense that it is probably a condition for
this bug to occur.
> Curl closes the connection (#0) used for the PUT, and reissues the PUT
> request on another connection (#1).
This sounds like a bug. The SSL error should make the connection fail and not
be retried transparently.
I think we can fix this problem by making sure Curl_write() returns something
else than CURLE_SEND_ERROR for this kind of SSL-level error. Curl_write()
calls Curl_ssl_send() for the SSL send.
-- / daniel.haxx.seReceived on 2009-08-29