mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
HTTP: don't use Expect: headers when on HTTP/2
Reported-by: Stefan Eissing Bug: https://github.com/bagder/curl/issues/169
This commit is contained in:
parent
2dc1a5ce93
commit
ef1c3b4648
10
lib/http.c
10
lib/http.c
@ -1570,10 +1570,11 @@ static CURLcode expect100(struct SessionHandle *data,
|
|||||||
const char *ptr;
|
const char *ptr;
|
||||||
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) &&
|
||||||
/* if not doing HTTP 1.0 or disabled explicitly, we add a Expect:
|
(conn->httpversion != 20)) {
|
||||||
100-continue to the headers which actually speeds up post operations
|
/* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an
|
||||||
(as there is one packet coming back from the web server) */
|
Expect: 100-continue to the headers which actually speeds up post
|
||||||
|
operations (as there is one packet coming back from the web server) */
|
||||||
ptr = Curl_checkheaders(conn, "Expect:");
|
ptr = Curl_checkheaders(conn, "Expect:");
|
||||||
if(ptr) {
|
if(ptr) {
|
||||||
data->state.expect100header =
|
data->state.expect100header =
|
||||||
@ -1793,6 +1794,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
http2 */
|
http2 */
|
||||||
switch(conn->negnpn) {
|
switch(conn->negnpn) {
|
||||||
case CURL_HTTP_VERSION_2_0:
|
case CURL_HTTP_VERSION_2_0:
|
||||||
|
conn->httpversion = 20; /* we know we're on HTTP/2 now */
|
||||||
result = Curl_http2_init(conn);
|
result = Curl_http2_init(conn);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user