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 httplib invalid scheme detection for HTTPS (#121). #122

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

chanchiem
Copy link
Contributor

Fixes misidentification of https requests as http requests in the segment metadata. This was caused by the patcher intercepting urllib3 HTTPS connections vs httplib HTTPS connections.

Issue #, if available:
#121

Description of changes:
Check if the connection instance is a subclass of httplib's https connection class or urllib3's https connection class.

Botocore3 and requests utilizes urllib3 for HTTPS, so incorrect URLs were being published to the subsegment http metadata for AWS API calls as well as Requests calls.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

    * Libraries utilizing urllib3 now properly get matched as https when an https request is made.
        + botocore and requests utilize urllib3, so any underlying https request now properly
          identifies as https.
@chanchiem chanchiem requested a review from haotianw465 January 18, 2019 22:46
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.

2 participants