Closed nathany closed 8 years ago
Nice looks good, Could you add a test for the GOAWAY
case to service_test.go
? other than that LGTM
This is the GoAwayError from actually hitting Apple:
http2.GoAwayError{LastStreamID:0x0, ErrCode:0x0, DebugData:"{\"reason\":\"BadCertificateEnvironment\"}"}
I'm not sure how to get that to return from an http handler though. Any ideas?
I'm looking at https://github.com/golang/net/blob/master/http2/transport_test.go#L2028 to see if I can write a test for this.
Right now httptest.NewServer
reports HTTP/1.1 for handlers (req.Proto).
my comment on the PR assumed you could use httptest
one of my favorite features of go. I now see it’s so much more then I thought to be able to test this. If the Framer.WriteGoAway
approach becomes to cumbersome, I’m okay with logging a issue and revisiting once httptest
supports http/2
Thanks to @bradfitz for his work on x/net/http2. https://github.com/golang/go/issues/14627
fixes #33.
need latest http2: go get -u golang.org/x/net/http2