From c021a60bccff0feddfec9d756cd65497eab60b39 Mon Sep 17 00:00:00 2001 From: Tiit Pikma Date: Thu, 13 Feb 2014 11:49:27 +0200 Subject: transfer: make Expect: 100-continue timeout configurable. Replaced the #define CURL_TIMEOUT_EXPECT_100 in transfer.c with the CURLOPT_EXPECT_100_TIMEOUT_MS option to make the timeout configurable. --- lib/transfer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/transfer.c') diff --git a/lib/transfer.c b/lib/transfer.c index f996b0ee5..83727db68 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -87,8 +87,6 @@ /* The last #include file should be: */ #include "memdebug.h" -#define CURL_TIMEOUT_EXPECT_100 1000 /* counting ms here */ - /* * This function will call the read callback to fill our buffer with data * to upload. @@ -839,7 +837,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data, *didwhat &= ~KEEP_SEND; /* we didn't write anything actually */ /* set a timeout for the multi interface */ - Curl_expire(data, CURL_TIMEOUT_EXPECT_100); + Curl_expire(data, data->set.expect_100_timeout); break; } @@ -1075,7 +1073,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, */ long ms = Curl_tvdiff(k->now, k->start100); - if(ms >= CURL_TIMEOUT_EXPECT_100) { + if(ms >= data->set.expect_100_timeout) { /* we've waited long enough, continue anyway */ k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; @@ -1969,7 +1967,7 @@ Curl_setup_transfer( /* 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); + Curl_expire(data, data->set.expect_100_timeout); } else { if(data->state.expect100header) -- cgit v1.2.3