curl-library
Re: Inclusion of Connection-Specific Headers in h2c
Date: Sat, 15 Nov 2014 00:42:16 +0900
Hi,
On Fri, Nov 14, 2014 at 1:54 AM, Samuel Hurst <samuelh_at_rd.bbc.co.uk> wrote:
> Hi All,
>
> While working with h2c I've come across a bug in the way curl reuses
> connections on subsequent requests to a server. Curl keeps
> connection-specific headers around in the HEADERS frame for subsequent
> requests to the server, in contraction to Section 8.1.2.2 of the HTTP/2
> draft.
>
> In my use case, I have a libcurl client using the multi interface
> connecting to an nghttpx server via a HTTP/1.1 upgrade connection. The
> upgrade succeeds and the response is HTTP/2. However, I am requesting
> two files together, so the client sends a HEADERS frame with the next
> GET request, but still has the connection:, upgrade: and http2-settings:
> headers set in the request. The server rightly responds with a
> RST_STREAM frame citing a protocol error, and then curl falls back,
> negotiates a new TCP connection and starts the whole HTTP/1.1 upgrade
> path again.
>
> I'm running latest releases of libcurl (7.39.0) and nghttp2 (0.6.6) when
> I see this behaviour.
>
>
I found the bug that curl unconditionally sends Upgrade headers to server
even after the connection was upgraded to HTTP/2.
The attached patch fixes this bug.
Best regards,
Tatsuhiro Tsujikawa
>
> Best Regards,
> Sam
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/x-gzip attachment: 0001-http2-Don-t-send-Upgrade-related-headers-once-we-ve-.patch.gz