You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run this in my app which is using a mixture of HTTP/1.1 and HTTP/2 endpoints, I see POST requests failing on calls to HTTP/1.1 endpoints. I've dug into the code and found that it seems that IsPipeliningPossible is ignoring the request method if the request asked for HTTP/2 upgrading and multiplexing is enabled. IsPipeliningPossible only checks the HTTP version that was asked for in the request, not the version that was negotiated in the connection when testing for multiplex support, so it seems that pipelining is wrongly being enabled for requests that do not have GET or HEAD methods on HTTP/1.1 channels.
I have fixed this locally by applying the following change:-
The function IsPipeliningPossible() would return TRUE if either
pipelining OR HTTP/2 were possible on a connection, which would lead to
it returning TRUE even for POSTs on HTTP/1 connections.
It now returns a bitmask so that the caller can differentiate which kind
the connection allows.
Fixes#1481
Reported-by: stootill at github
________________________________
From: Daniel Stenberg <notifications@github.com>
Sent: 12 May 2017 15:32
To: curl/curl
Cc: Tootill, Stewart; Author
Subject: Re: [curl/curl] Enabling CURLPIPE_HTTP1 and CURLPIPE_MULTIPLEX, and requesting HTTP2 causes POST requests to get pipelined (#1481)
See #1483<#1483> for my attempted fix for this issue. Would be great if you could try it out!
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1481 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AbUllxbFyQo6TIu_BHGvha35087lAGAmks5r5G2SgaJpZM4NZIUK>.
I have setup libcurl to enable HTTP2, and am configuring multi to enable pipelining and multiplexing as follows:-
curl_multi_setopt(_curlMultiHandle, CURLMOPT_PIPELINING, CURLPIPE_HTTP1 | CURLPIPE_MULTIPLEX);
On each request I am requesting HTTP2 as follows:-
curl_easy_setopt(_curlHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
When I run this in my app which is using a mixture of HTTP/1.1 and HTTP/2 endpoints, I see POST requests failing on calls to HTTP/1.1 endpoints. I've dug into the code and found that it seems that
IsPipeliningPossible
is ignoring the request method if the request asked for HTTP/2 upgrading and multiplexing is enabled.IsPipeliningPossible
only checks the HTTP version that was asked for in the request, not the version that was negotiated in the connection when testing for multiplex support, so it seems that pipelining is wrongly being enabled for requests that do not have GET or HEAD methods on HTTP/1.1 channels.I have fixed this locally by applying the following change:-
`
@@ -2902,7 +2902,8 @@ static bool IsPipeliningPossible(const struct Curl_easy *handle,
return TRUE;
`
but I've found other bug reports (#584) that suggest that this caused regressions elsewhere (https://curl.haxx.se/mail/lib-2016-01/0031.html) so am not sure how to proceed.
Thanks!
The text was updated successfully, but these errors were encountered: