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

Re-enable H/2 on the default HTTP client for Go 1.15+ #1156

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

dcarney-stripe
Copy link
Contributor

Go 1.15 fixes a long-standing bug in the HTTP/2 client that led to HTTP/2 being disabled by default in stripe-go as part of #903.

This PR modifies the default HTTP/2 client for those users running Go 1.15 or above to remove the restriction against using HTTP/2. It accomplishes this via the use of a +build tag (aka conditional compliation) of the new source file stripego115.go.

The bug is scheduled to be backported to 1.13.16 and 1.14.8, but even once those backports are complete, we can only conditionally compile against a major release of Go, per https://golang.org/cmd/go/#hdr-Build_constraints:

  • a term for each Go major release, through the current version:
    “go1.1” from Go version 1.1 onward, “go1.12" from Go 1.12, and so on.

@CLAassistant
Copy link

CLAassistant commented Aug 12, 2020

CLA assistant check
All committers have signed the CLA.

@brandur-stripe brandur-stripe self-assigned this Aug 12, 2020
@brandur-stripe
Copy link
Contributor

Thanks @dcarney-stripe! This LGTM.

We can re-evaluate a potentially broader application of an HTTP/2 client in a few months depending on how those backports are coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants