summaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-05-09 12:47:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-05-10 12:55:36 +0200
commit31b39c40cf909d34f27dc655755f346482f57089 (patch)
tree4fcf5799aebdf1573b6789f1a19ef3ac8aa0e279 /lib/http.c
parente9fd794a616c10bd0d017a76f8fdccaf4cc76851 (diff)
downloadcurl-31b39c40cf909d34f27dc655755f346482f57089.tar.gz
multi: use a fixed array of timers instead of malloc
... since the total amount is low this is faster, easier and reduces memory overhead. Also, Curl_expire_done() can now mark an expire timeout as done so that it never times out. Closes #1472
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c
index 93aac201c..8e7fb0fa9 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2746,6 +2746,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
data->req.upload_done = TRUE;
data->req.keepon &= ~KEEP_SEND; /* we're done writing */
data->req.exp100 = EXP100_SEND_DATA; /* already sent */
+ Curl_expire_done(data, EXPIRE_100_TIMEOUT);
}
}
@@ -3042,6 +3043,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
if(k->exp100 > EXP100_SEND_DATA) {
k->exp100 = EXP100_SEND_DATA;
k->keepon |= KEEP_SEND;
+ Curl_expire_done(data, EXPIRE_100_TIMEOUT);
}
break;
case 101:
@@ -3168,6 +3170,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
* request body has been sent we stop sending and mark the
* connection for closure after we've read the entire response.
*/
+ Curl_expire_done(data, EXPIRE_100_TIMEOUT);
if(!k->upload_done) {
if(data->set.http_keep_sending_on_error) {
infof(data, "HTTP error before end of send, keep sending\n");