8000 parse GOAWAY error responses from Apple by nathany · Pull Request #71 · RobotsAndPencils/buford · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

parse GOAWAY error responses from Apple #71

8000
Merged
merged 1 commit into from
Jun 29, 2016
Merged

parse GOAWAY error responses from Apple #71

merged 1 commit into from
Jun 29, 2016

Conversation

nathany
Copy link
Contributor
@nathany nathany commented Jun 29, 2016

Thanks to @bradfitz for his work on x/net/http2.
golang/go#14627

fixes #33.

need latest http2: go get -u golang.org/x/net/http2

@curtisallen
Copy link
Contributor

Nice looks good, Could you add a test for the GOAWAY case to service_test.go ? other than that LGTM

@nathany
Copy link
Contributor Author
nathany commented Jun 29, 2016

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?

@nathany
Copy link
Contributor Author
nathany commented Jun 29, 2016

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.

@nathany
Copy link
Contributor Author
nathany commented Jun 29, 2016

Right now httptest.NewServer reports HTTP/1.1 for handlers (req.Proto).

8000

@curtisallen
Copy link
Contributor

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

@nathany nathany merged commit 2d03c35 into master Jun 29, 2016
@nathany nathany deleted the goaway branch June 29, 2016 22:40
catatsuy added a commit to mercari/gaurun that referenced this pull request Oct 10, 2019
HTTP/2 was not available when overwriting TLSClientConfig.
But Go 1.13 can be used with ForceAttemptHTTP2.
If Apple returns an error for `http2/GoAwayError`,
I change the wording of the error. But all we can do is retry.

cf:
* RobotsAndPencils/buford#71
* golang/go#14627
catatsuy added a commit to mercari/gaurun that referenced this pull request Oct 10, 2019
HTTP/2 was not available when overwriting TLSClientConfig.
But Go 1.13 can be used with ForceAttemptHTTP2.
If Apple returns an error for `http2/GoAwayError`,
I change the wording of the error. But all we can do is retry.

cf:
* RobotsAndPencils/buford#71
* golang/go#14627
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EOF error when there is a GOAWAY response
2 participants
0