mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
IsPipeliningPossible: http2 can always "pipeline" (multiplex)
This commit is contained in:
parent
ee3ad233a2
commit
e91aedd840
13
lib/url.c
13
lib/url.c
@ -2813,13 +2813,20 @@ static bool SocketIsDead(curl_socket_t sock)
|
|||||||
static bool IsPipeliningPossible(const struct SessionHandle *handle,
|
static bool IsPipeliningPossible(const struct SessionHandle *handle,
|
||||||
const struct connectdata *conn)
|
const struct connectdata *conn)
|
||||||
{
|
{
|
||||||
|
/* If a HTTP protocol and pipelining is enabled */
|
||||||
if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
|
if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
|
||||||
Curl_multi_pipeline_enabled(handle->multi) &&
|
Curl_multi_pipeline_enabled(handle->multi)) {
|
||||||
|
|
||||||
|
if((handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
||||||
(handle->set.httpreq == HTTPREQ_GET ||
|
(handle->set.httpreq == HTTPREQ_GET ||
|
||||||
handle->set.httpreq == HTTPREQ_HEAD) &&
|
handle->set.httpreq == HTTPREQ_HEAD))
|
||||||
handle->set.httpversion != CURL_HTTP_VERSION_1_0)
|
/* didn't ask for HTTP/1.0 and a GET or HEAD */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
if(conn->httpversion == 20)
|
||||||
|
/* talking HTTP/2 */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user