Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for h2 make sure it follows http messaging from spec #56

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jgautier
Copy link

According to the SPDY spec HEADER frames were allowed to be interleaved with DATA frames but with HTTP/2 it must follow the HTTP semantics lined out here:

https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-8

Which basically says:

  1. Stream starts with a HEADER frame
  2. Stream can can contain one or more DATA frames
  3. Stream can can optionally have one HEADER frame at the end of the stream and the FIN flag must be set to true.

I ran into this issue when trying to use a node-spdy client against a node v10 server running node's native HTTP/2 server and the server was returning trailers.

anandsuresh and others added 7 commits March 29, 2018 16:25
The current code auto-upgrades all SPDY/3 clients to SPDY/3.1 when
operating in **plain** mode with **autoSpdy31** set to true. This seems
rather restrictive, implying that with autoSpdy31 set to true, the
server does not support SPDY/3-only clients.

This commit fixes this by only upgrading SPDY/3 clients to SPDY/3.1 when
the server receives a WINDOW_UPDATE for stream id 0. This ensures
that SPDY/3 clients can proceed uninhibited when operating in **plain**
mode, and ensuring that the autoSpdy31 option is only used for
SPDY/3.1 clients in **plain** mode, allowing for both SPDY/3 and
SPDY/3.1 clients to co-exist on the same server in **plain** mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants