aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-05-07 08:59:28 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-18 08:57:18 +0200
commite91aedd84020674e14f2e2f7c533ca1c0db88bec (patch)
tree1c4fe309095aa1f4855e2d937670ff7c53b20c2d /lib
parentee3ad233a2698669af66e7af8c47fb4b2c92f6be (diff)
IsPipeliningPossible: http2 can always "pipeline" (multiplex)
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/url.c b/lib/url.c
index 688dd9ea0..dde53f0e4 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2813,13 +2813,20 @@ static bool SocketIsDead(curl_socket_t sock)
static bool IsPipeliningPossible(const struct SessionHandle *handle,
const struct connectdata *conn)
{
+ /* If a HTTP protocol and pipelining is enabled */
if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
- Curl_multi_pipeline_enabled(handle->multi) &&
- (handle->set.httpreq == HTTPREQ_GET ||
- handle->set.httpreq == HTTPREQ_HEAD) &&
- handle->set.httpversion != CURL_HTTP_VERSION_1_0)
- return TRUE;
+ Curl_multi_pipeline_enabled(handle->multi)) {
+ if((handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
+ (handle->set.httpreq == HTTPREQ_GET ||
+ handle->set.httpreq == HTTPREQ_HEAD))
+ /* didn't ask for HTTP/1.0 and a GET or HEAD */
+ return TRUE;
+
+ if(conn->httpversion == 20)
+ /* talking HTTP/2 */
+ return TRUE;
+ }
return FALSE;
}