1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 09:05:04 -05:00

HTTP: increase EXPECT_100_THRESHOLD to 1Mb

Mentioned: https://curl.haxx.se/mail/lib-2020-01/0050.html

Closes #4814
This commit is contained in:
加藤郁之 2020-01-14 23:34:56 +09:00 committed by Daniel Stenberg
parent c275aa9903
commit 7ff9222ced
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
9 changed files with 12 additions and 15 deletions

View File

@ -54,8 +54,8 @@ the POST data from the read callback. If you want to send a zero-byte POST set
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header, Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header,
and libcurl will add that header automatically if the POST is either known to and libcurl will add that header automatically if the POST is either known to
be larger than 1024 bytes or if the expected size is unknown. You can disable be larger than 1MB or if the expected size is unknown. You can disable this
this header with \fICURLOPT_HTTPHEADER(3)\fP as usual. header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
To make multipart/formdata posts (aka RFC2388-posts), check out the To make multipart/formdata posts (aka RFC2388-posts), check out the
\fICURLOPT_HTTPPOST(3)\fP option combined with \fIcurl_formadd(3)\fP. \fICURLOPT_HTTPPOST(3)\fP option combined with \fIcurl_formadd(3)\fP.

View File

@ -116,7 +116,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn);
* *
*/ */
#ifndef EXPECT_100_THRESHOLD #ifndef EXPECT_100_THRESHOLD
#define EXPECT_100_THRESHOLD 1024 #define EXPECT_100_THRESHOLD (1024*1024)
#endif #endif
#endif /* CURL_DISABLE_HTTP */ #endif /* CURL_DISABLE_HTTP */

View File

@ -32,7 +32,7 @@ http
HTTP POST with server closing connection before (all) data is received HTTP POST with server closing connection before (all) data is received
</name> </name>
<command> <command>
-d @log/input1070 http://%HOSTIP:%HTTPPORT/1070 -d @log/input1070 http://%HOSTIP:%HTTPPORT/1070 -H "Expect: 100-continue"
</command> </command>
<file name="log/input1070"> <file name="log/input1070">
This creates the named file with this content before the test case is run, This creates the named file with this content before the test case is run,
@ -55,9 +55,9 @@ OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
POST /1070 HTTP/1.1 POST /1070 HTTP/1.1
Host: %HOSTIP:%HTTPPORT Host: %HOSTIP:%HTTPPORT
Accept: */* Accept: */*
Expect: 100-continue
Content-Length: 2313 Content-Length: 2313
Content-Type: application/x-www-form-urlencoded Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
This creates This creates
</protocol> </protocol>

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,6 @@ User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 z
Host: %HOSTIP:%HTTPPORT Host: %HOSTIP:%HTTPPORT
Accept: */* Accept: */*
Content-Length: 1264 Content-Length: 1264
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32 Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32
------------------------------24e78000bd32 ------------------------------24e78000bd32

View File

@ -49,7 +49,6 @@ User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 z
Host: %HOSTIP:%HTTPSPORT Host: %HOSTIP:%HTTPSPORT
Accept: */* Accept: */*
Content-Length: 1386 Content-Length: 1386
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------c3b2ef7f0bb8 Content-Type: multipart/form-data; boundary=----------------------------c3b2ef7f0bb8
------------------------------c3b2ef7f0bb8 ------------------------------c3b2ef7f0bb8

View File

@ -48,7 +48,6 @@ User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 z
Host: %HOSTIP:%HTTPPORT Host: %HOSTIP:%HTTPPORT
Accept: */* Accept: */*
Content-Length: 1184 Content-Length: 1184
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32 Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32
------------------------------24e78000bd32 ------------------------------24e78000bd32

Binary file not shown.

View File

@ -61,7 +61,6 @@ Host: %HOSTIP:%HTTPPORT
Accept: */* Accept: */*
Content-Length: 17139 Content-Length: 17139
Content-Type: multipart/form-data; boundary=---------------------------- Content-Type: multipart/form-data; boundary=----------------------------
Expect: 100-continue
------------------------------ ------------------------------
Content-Disposition: form-data; name="hello" Content-Disposition: form-data; name="hello"