diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-08-20 09:59:28 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-08-20 16:53:40 +0200 |
commit | 99775438d61f33222297ab7068c79022063555a8 (patch) | |
tree | 234d05e7a382d9c1c338dc431353e0b7f8c8c243 /lib | |
parent | 08b99e17df5a2d1d98a2d9ab06eedf7405906105 (diff) |
http: remove chunked-encoding and expect header use for HTTP/3
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/http.c b/lib/http.c index 3ba963519..d352d139d 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1690,7 +1690,7 @@ static CURLcode expect100(struct Curl_easy *data, data->state.expect100header = FALSE; /* default to false unless it is set to TRUE below */ if(use_http_1_1plus(data, conn) && - (conn->httpversion != 20)) { + (conn->httpversion < 20)) { /* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an Expect: 100-continue to the headers which actually speeds up post operations (as there is one packet coming back from the web server) */ @@ -1871,7 +1871,7 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn, Connection: */ checkprefix("Connection:", compare)) ; - else if((conn->httpversion == 20) && + else if((conn->httpversion >= 20) && checkprefix("Transfer-Encoding:", compare)) /* HTTP/2 doesn't support chunked requests */ ; @@ -2255,8 +2255,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) /* don't enable chunked during auth neg */ ; else if(use_http_1_1plus(data, conn)) { - /* HTTP, upload, unknown file size and not HTTP 1.0 */ - data->req.upload_chunky = TRUE; + if(conn->httpversion < 20) + /* HTTP, upload, unknown file size and not HTTP 1.0 */ + data->req.upload_chunky = TRUE; } else { failf(data, "Chunky upload is not supported by HTTP 1.0"); |