diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-11-20 21:44:00 +0900 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-11-20 14:41:17 +0100 |
commit | 7d1f2ac7691c2d30eaf73ace2176ca1383b5f72b (patch) | |
tree | 5bfd778123ea786657fea918811c719712cde6f0 | |
parent | 416cd9ac11af4045a4bfcd16ad3fffc20b0d3cd7 (diff) |
http: Disable pipelining for HTTP/2 and upgraded connections
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.
-rw-r--r-- | lib/http.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index 76af6f702..2e9fd7d71 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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; |