Skip to content

Commit

Permalink
http: Disable pipelining for HTTP/2 and upgraded connections
Browse files Browse the repository at this point in the history
This commit disables pipelining for HTTP/2 or upgraded connections.  For
HTTP/2, we do not support multiplexing.  In general, requests cannot be
pipelined in an upgraded connection, since it is now different protocol.
  • Loading branch information
tatsuhiro-t authored and bagder committed Nov 20, 2014
1 parent 416cd9a commit 7d1f2ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/http.c
Expand Up @@ -3293,6 +3293,16 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
infof(data, "HTTP 1.0, assume close after body\n");
connclose(conn, "HTTP/1.0 close after body");
}
else if(conn->httpversion == 20 ||
(k->upgr101 == UPGR101_REQUESTED && k->httpcode == 101)) {
/* Don't enable pipelining for HTTP/2 or upgraded connection. For
HTTP/2, we do not support multiplexing. In general, requests
cannot be pipelined in upgraded connection, since it is now
different protocol. */
DEBUGF(infof(data,
"HTTP 2 or upgraded connection do not support "
"pipelining for now\n"));
}
else if(conn->httpversion >= 11 &&
!conn->bits.close) {
struct connectbundle *cb_ptr;
Expand Down

0 comments on commit 7d1f2ac

Please sign in to comment.