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

x/net/http2: HeaderFrameWriter will drop valid Header Frames if StreamDep=0 #15444

Closed
nemosupremo opened this issue Apr 26, 2016 · 1 comment
Closed

Comments

@nemosupremo
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)? go version go1.6 darwin/amd64
  2. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/nimi/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.6/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.6/libexec/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
  1. What did you do?

While debugging issue #15425, I changed the default stream header priority frame to StreapDep=0,Weight=255 in order to mimic Chrome.
Setting Stream Dependecy to 0 should be valid.

  1. What did you expect to see?

The client should accept the header frame.

  1. What did you see instead?

The client drops the header frame, as it things 0 is not a valid frame. In frame.go#980, WriteHeaders does not consider steam 0 to be a valid dependent stream id. As far as the spec is concerned, (and based off what I think Chrome does), 0 is a valid dependent stream id (meaning the stream doesn't depend on anything).

However the validStreamID function, does not consider this, and writing the header fails.

@gopherbot
Copy link

CL https://golang.org/cl/22476 mentions this issue.

@golang golang locked and limited conversation to collaborators Apr 26, 2017
c3mb0 pushed a commit to c3mb0/net that referenced this issue Apr 2, 2018
But still check that the high bit isn't set.

Fixes golang/go#15444

Change-Id: Ic9339244d3d0c4e4d6573a691b3ba37c9eac3981
Reviewed-on: https://go-review.googlesource.com/22476
Reviewed-by: Andrew Gerrand <adg@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants