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,
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
this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
be larger than 1MB or if the expected size is unknown. You can disable this
header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
To make multipart/formdata posts (aka RFC2388-posts), check out the
\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
#define EXPECT_100_THRESHOLD 1024
#define EXPECT_100_THRESHOLD (1024*1024)
#endif
#endif /* CURL_DISABLE_HTTP */

View File

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

Binary file not shown.

View File

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