multi_socket: improved 100-continue timeout handling
When waiting for a 100-continue response from the server, the Curl_readwrite() will refuse to run if called until the timeout has been reached. We timeout code in multi_socket() allows code to run slightly before the actual timeout time, so for test 154 it could lead to the function being executed but refused in Curl_readwrite() and then the application would just sit idling forever. This was detected with runtests.pl -e on test 154.
This commit is contained in:
@@ -1952,8 +1952,10 @@ Curl_setup_transfer(
|
||||
k->exp100 = EXP100_AWAITING_CONTINUE;
|
||||
k->start100 = Curl_tvnow();
|
||||
|
||||
/* set a timeout for the multi interface */
|
||||
Curl_expire(data, CURL_TIMEOUT_EXPECT_100);
|
||||
/* Set a timeout for the multi interface. Add the inaccuracy margin so
|
||||
that we don't fire slightly too early and get denied to run. */
|
||||
Curl_expire(data, CURL_TIMEOUT_EXPECT_100 +
|
||||
MULTI_TIMEOUT_INACCURACY / 1000);
|
||||
}
|
||||
else {
|
||||
if(data->state.expect100header)
|
||||
|
Reference in New Issue
Block a user