Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default EXPECT_100_THRESHOLD 1Mb #4814

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/libcurl/opts/CURLOPT_POSTFIELDS.3
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/http.h
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions tests/data/test1070
Expand Up @@ -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,
Expand All @@ -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>
Expand Down
13 changes: 7 additions & 6 deletions tests/data/test1129

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/data/test1133
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/data/test304
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/data/test39
Expand Up @@ -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
Expand Down
Binary file modified tests/data/test552
Binary file not shown.
1 change: 0 additions & 1 deletion tests/data/test651
Expand Up @@ -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"
Expand Down