curl-library
Re: Inclusion of Connection-Specific Headers in h2c
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):
E.g.
Source | Destination | Protocol | Info (Stream IDs)
10.0.2.15 | 172.29.1.10 | HTTP | GET /1/IS.mp4 HTTP/1.1
172.29.1.10 | 10.0.2.15 | HTTP | HTTP/1.1 101 Switching Protocols
10.0.2.15 | 172.29.1.10 | HTTP2 | Magic
172.29.1.10 | 10.0.2.15 | HTTP2 | HEADERS (1) [Status200], DATA
(1), DATA (1)
10.0.2.15 | 172.29.1.10 | HTTP2 | SETTINGS
172.29.1.10 | 10.0.2.15 | HTTP2 | SETTINGS [ACK above]
10.0.2.15 | 172.29.1.10 | HTTP2 | HEADERS (3) [GET /1/V1.mp4]
10.0.2.15 | 172.29.1.10 | HTTP2 | HEADERS (5) [GET /1/A1.mp4]
172.29.1.10 | 10.0.2.15 | HTTP2 | HEADERS (3) [Status200], DATA (3)
10.0.2.15 | 172.29.1.10 | HTTP2 | RST_STREAM (3)
172.29.1.10 | 10.0.2.15 | 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
content-lengths.
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,
Sam
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-14