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

allow https requests to properly pass through HTTPretty #290

Closed
wants to merge 2 commits into from

Conversation

pegler
Copy link

@pegler pegler commented Mar 24, 2016

I think this will also need to set truesock back to the original socket at some point.

@gabrielfalcao
Copy link
Owner

I'm so sad that this PR broke the continuous integration, such a great contribution!
https://travis-ci.org/gabrielfalcao/HTTPretty/jobs/118221516#L402

@azban
Copy link

azban commented Nov 11, 2016

i'm still not seeing this work correctly with the latests requests + requests[security].. i never get to readall, because the urllib3 connectionpool verifies the connection before sending.

i've narrowed it down to not doing a connect on truesock here, even if the request does not match any registered httpretty entries. unfortunately at this level, we only have the host and port, which is not enough information to be able to match. which leads me to believe that we may have to monkey patch supported libraries to add information for the socket to use if necessary. does this seem like a reasonable approach?

@azban azban mentioned this pull request Nov 14, 2016
@@ -98,6 +98,7 @@
if not PY3:
old_sslwrap_simple = ssl.sslwrap_simple
old_sslsocket = ssl.SSLSocket
old_sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
Copy link
Owner

Choose a reason for hiding this comment

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

where is this variable being used?

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.

None yet

3 participants