curl-library
Bugfix: Location header in multi interface causes freeze
Date: Sat, 10 Jan 2009 00:33:49 +0100
Hello,
When using the multi interface over HTTP and the server returns a
Location header, the running easy handle will get stuck in the
CURLM_STATE_PERFORM state, leaving the external event loop stuck
waiting for data from the ingoing socket (when using the
curl_multi_socket_action stuff). While this bug was pretty hard to
find, it seems to require only a one-line fix. The break statement on
line 1374 in multi.c caused the function to skip the call to
multistate().
How to reproduce this bug? Well, that's another question.
evhiperfifo.c in the examples directory chokes on this bug only
_sometimes_, probably depending on how fast the URLs are added. One
way of testing the bug out is writing to hiper.fifo from more than one
source at the same time.
Regards,
Emil Romanus
--- curl-7.19.3-20090109_original/lib/multi.c 2008-12-21
04:00:04.000000000 +0100
+++ curl-7.19.3-20090109/lib/multi.c 2009-01-10 00:48:34.000000000 +0100
@@ -1371,7 +1371,6 @@ static CURLMcode multi_runsingle(struct
easy->result = Curl_follow(easy->easy_handle, newurl, FOLLOW_FAKE);
if (easy->result)
free(newurl);
- break;
}
multistate(easy, CURLM_STATE_DONE);
Received on 2009-01-10