aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-09-29 12:22:10 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-09-29 12:22:10 +0000
commit0a305eb79f444db81b4f6ae8c6f201af46f1888e (patch)
tree7e58c34dae11dacb3148c4a2f5d7c434ec9e4871 /lib
parentaff5408633230a7442553889c8e93f05900b8465 (diff)
- Bug #2107803 (http://curl.haxx.se/bug/view.cgi?id=2107803) "no
CURLINFO_REDIRECT_URL in multi mode" also contained a patch that fixed the problem.
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 0fd1aa15b..6eda8c1c8 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1310,7 +1310,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* Check if we can move pending requests to send pipe */
checkPendPipeline(easy->easy_conn);
- /* When we follow redirects, must to go back to the CONNECT state */
+ /* When we follow redirects or is set to retry the connection, we must
+ to go back to the CONNECT state */
if(easy->easy_handle->req.newurl || retry) {
if(!retry) {
/* if the URL is a follow-location and not just a retried request
@@ -1335,6 +1336,18 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
}
else {
/* after the transfer is done, go DONE */
+
+ /* but first check to see if we got a location info even though we're
+ not following redirects */
+ if (easy->easy_handle->req.location) {
+ newurl = easy->easy_handle->req.location;
+ easy->easy_handle->req.location = NULL;
+ easy->result = Curl_follow(easy->easy_handle, newurl, FOLLOW_FAKE);
+ if (easy->result)
+ free(newurl);
+ break;
+ }
+
multistate(easy, CURLM_STATE_DONE);
result = CURLM_CALL_MULTI_PERFORM;
}