diff options
author | Remi Gacogne <rgacogne@nuagelabs.fr> | 2014-02-06 23:16:37 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-02-06 23:21:42 +0100 |
commit | 1ebf22cc0eaea3c8513d2bc23937e4388681f3b8 (patch) | |
tree | 95553b1f6d103fd566db84dfefb8afb99935d238 | |
parent | ff92fcfb907b6aa69bc7e35670797fc0440756bd (diff) |
100-continue: fix timeout condition
When using the multi socket interface, libcurl calls the
curl_multi_timer_callback asking to be woken up after
CURL_TIMEOUT_EXPECT_100 milliseconds.
After the timeout has expired, calling curl_multi_socket_action with
CURL_SOCKET_TIMEOUT as sockfd leads libcurl to check expired
timeouts. When handling the 100-continue one, the following check in
Curl_readwrite() fails if exactly CURL_TIMEOUT_EXPECT_100 milliseconds
passed since the timeout has been set!
It seems logical to consider that having waited for exactly
CURL_TIMEOUT_EXPECT_100 ms is enough.
Bug: http://curl.haxx.se/bug/view.cgi?id=1334
-rw-r--r-- | lib/transfer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 3408a8414..f996b0ee5 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1075,7 +1075,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, */ long ms = Curl_tvdiff(k->now, k->start100); - if(ms > CURL_TIMEOUT_EXPECT_100) { + if(ms >= CURL_TIMEOUT_EXPECT_100) { /* we've waited long enough, continue anyway */ k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; |