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

Fix support for HTTPS proxies #580

Merged
merged 1 commit into from
Mar 14, 2019
Merged

Fix support for HTTPS proxies #580

merged 1 commit into from
Mar 14, 2019

Conversation

ob-stripe
Copy link
Contributor

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

When I enabled persistent connections in #560, I broke support for HTTPS proxies: instances of HttpsProxyAgent are not instances of https.Agent, so they are assigned to http_agent instead of https_agent.

Rather than try to store all possible agent types in the correct variable, this PR reverts to the previous behavior of storing the agent in agent regardless of its type. If agent is null,StripeResource will use a default agent of the correct type depending on whether the request uses HTTP or HTTPS.

Fixes #579.

Copy link
Contributor

@rattrayalex-stripe rattrayalex-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-stripe
Copy link
Contributor Author

Thanks Alex!

@ob-stripe ob-stripe merged commit dbcd7d1 into master Mar 14, 2019
@ob-stripe ob-stripe deleted the ob-fix-579 branch March 14, 2019 17:36
@ob-stripe
Copy link
Contributor Author

Released as 6.26.1.

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