cURL / Mailing Lists / curl-library / Single Mail


Re: Inclusion of Connection-Specific Headers in h2c

From: Samuel Hurst <>
Date: Fri, 14 Nov 2014 17:01:05 +0000

Hi Tatsuhiro,

On 14/11/2014 15:42, Tatsuhiro Tsujikawa wrote:
> ‚Äč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.

Thanks for the patch, it does solve the initial issue but similarly to
my own fix I've been working on today it seems to expose a different
issue. It seems that the client is sending two HEADERS frames for two
resources in very short order, and when the server attempts to respond
the client is sending RST_STREAM with a flagged protocol error.

The below is a paraphrased wireshark log showing the issue (sadly
can't attach the full trace as it contains sensitive information):

Source | Destination | Protocol | Info (Stream IDs) | | HTTP | GET /1/IS.mp4 HTTP/1.1 | | HTTP | HTTP/1.1 101 Switching Protocols | | HTTP2 | Magic | | HTTP2 | HEADERS (1) [Status200], DATA
(1), DATA (1) | | HTTP2 | SETTINGS | | HTTP2 | SETTINGS [ACK above] | | HTTP2 | HEADERS (3) [GET /1/V1.mp4] | | HTTP2 | HEADERS (5) [GET /1/A1.mp4] | | HTTP2 | HEADERS (3) [Status200], DATA (3) | | HTTP2 | RST_STREAM (3) | | HTTP2 | HEADERS (5) [Status200], DATA (5)

I only see the behaviour when I see two HEADERS frames sent before the
server could respond. Otherwise transmission is fine. I'm also not so
sure whether the second 0x1-flagged DATA frame shows up, my version of
Wireshark is having some issues with HTTP2 packets with long

Settings are whatever nghttp2 uses as defaults as I am not explicitly
setting them. (This seems to be max number of concurrent streams as
100 and window size 65535)

I'm actually on holiday next week so any further discussion on this
will probably come from my colleague Lucas Pardue.

Best Regards,

List admin:
Received on 2014-11-14