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

Only use HTTP/2 with curl >= 7.60.0 #623

Merged
merged 1 commit into from
Apr 2, 2019
Merged

Only use HTTP/2 with curl >= 7.60.0 #623

merged 1 commit into from
Apr 2, 2019

Conversation

ob-stripe
Copy link
Contributor

r? @brandur-stripe
cc @stripe/api-libraries

When using HTTP/2, Stripe's API servers are configured to send a GOAWAY frame after 1000 requests. curl versions older than 7.60.0 had a bug where curl would ignore the GOAWAY frame (curl/curl#2416).

This PR changes the behavior of CurlClient so that we only set CURLOPT_HTTP_VERSION to CURL_HTTP_VERSION_2TLS if the version of curl is >= 7.60.0 unless the user explicitly overrides this, either by setting CURLOPT_HTTP_VERSION themselves (this was already the case prior to this PR) or by calling setEnableHttp2(true) on the CurlClient instance.

Copy link
Contributor

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice OB!

@ob-stripe
Copy link
Contributor Author

Thanks Brandur!

@ob-stripe ob-stripe merged commit 06c612b into master Apr 2, 2019
@ob-stripe ob-stripe deleted the ob-fix-http2 branch April 2, 2019 18:29
@ob-stripe
Copy link
Contributor Author

Released as 6.31.3.

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

Successfully merging this pull request may close these issues.

3 participants