mirror of
https://github.com/curl/curl.git
synced 2026-07-30 10:18:03 +03:00
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.
This commit is contained in:
parent
bcb32e915e
commit
c021a60bcc
6 changed files with 26 additions and 5 deletions
10
lib/url.c
10
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue