aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorTiit Pikma <tiit.pikma@cyber.ee>2014-02-13 11:49:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-02-13 16:05:17 +0100
commitc021a60bccff0feddfec9d756cd65497eab60b39 (patch)
tree6fc993a8ae84809b12ddd97a3816d37d813ab549 /lib/url.c
parentbcb32e915eb700d058e12b2f3bd8b103a16244d8 (diff)
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.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 3f2112d8a..5020a2bdf 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -565,6 +565,8 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
set->ssl_enable_npn = TRUE;
set->ssl_enable_alpn = TRUE;
+
+ set->expect_100_timeout = 1000L; /* Wait for a second by default. */
return res;
}
@@ -1256,6 +1258,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
}
break;
+ case CURLOPT_EXPECT_100_TIMEOUT_MS:
+ /*
+ * Time to wait for a response to a HTTP request containing an
+ * Expect: 100-continue header before sending the data anyway.
+ */
+ data->set.expect_100_timeout = va_arg(param, long);
+ break;
+
#endif /* CURL_DISABLE_HTTP */
case CURLOPT_CUSTOMREQUEST: