cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3390796 ] Curl_retry_request doesn't check return value of readrewind

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sat, 13 Aug 2011 00:35:15 +0200

Bugs item #3390796, was opened at 2011-08-13 00:30
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3390796&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Daniel Stenberg (bagder)
Summary: Curl_retry_request doesn't check return value of readrewind

Initial Comment:
Version 7.21.7

Curl_retry_request will call Curl_readrewind if some data needs to be resent when the request is retried. However, it doesn't check the return value of Curl_readrewind, which can cause the retried request to hang if it's not possible to rewind the data that's already been sent. It looks like that behavior was added in this commit: https://github.com/bagder/curl/commit/058fb3355715747e754ede5395c52390ec3394be

----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2011-08-13 00:35

Message:
Good point. How about this?

diff --git a/lib/transfer.c b/lib/transfer.c
index f019bb0..f1896b0 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2081,7 +2081,7 @@ CURLcode Curl_retry_request(struct connectdata
*conn,
                                 transferred! */
 
     if(data->state.proto.http->writebytecount)
- Curl_readrewind(conn);
+ return Curl_readrewind(conn);
   }
   return CURLE_OK;

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3390796&group_id=976
Received on 2011-08-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET