mirror of
https://github.com/curl/curl.git
synced 2025-01-12 13:55:11 +08:00
http: remove chunked-encoding and expect header use for HTTP/3
This commit is contained in:
parent
08b99e17df
commit
99775438d6
@ -1690,7 +1690,7 @@ static CURLcode expect100(struct Curl_easy *data,
|
|||||||
data->state.expect100header = FALSE; /* default to false unless it is set
|
data->state.expect100header = FALSE; /* default to false unless it is set
|
||||||
to TRUE below */
|
to TRUE below */
|
||||||
if(use_http_1_1plus(data, conn) &&
|
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
|
/* 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
|
Expect: 100-continue to the headers which actually speeds up post
|
||||||
operations (as there is one packet coming back from the web server) */
|
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: */
|
Connection: */
|
||||||
checkprefix("Connection:", compare))
|
checkprefix("Connection:", compare))
|
||||||
;
|
;
|
||||||
else if((conn->httpversion == 20) &&
|
else if((conn->httpversion >= 20) &&
|
||||||
checkprefix("Transfer-Encoding:", compare))
|
checkprefix("Transfer-Encoding:", compare))
|
||||||
/* HTTP/2 doesn't support chunked requests */
|
/* 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 */
|
/* don't enable chunked during auth neg */
|
||||||
;
|
;
|
||||||
else if(use_http_1_1plus(data, conn)) {
|
else if(use_http_1_1plus(data, conn)) {
|
||||||
/* HTTP, upload, unknown file size and not HTTP 1.0 */
|
if(conn->httpversion < 20)
|
||||||
data->req.upload_chunky = TRUE;
|
/* HTTP, upload, unknown file size and not HTTP 1.0 */
|
||||||
|
data->req.upload_chunky = TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
failf(data, "Chunky upload is not supported by HTTP 1.0");
|
failf(data, "Chunky upload is not supported by HTTP 1.0");
|
||||||
|
Loading…
Reference in New Issue
Block a user