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 connection pool managers not taking varying TLS parameters into account #5220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Overv
Copy link

@Overv Overv commented Oct 2, 2019

This PR fixes #5140 and #4325 by returning different connection and proxy pools based on the connection parameters for the current request.

I tested it with the following code:

import requests

session = requests.Session()

print(session.get('https://client.badssl.com/'))
print(session.get('https://client.badssl.com/', cert=('client.crt', 'client.key')))
print(session.get('https://client.badssl.com/', cert=('client.crt', 'client.key')))
print(session.get('https://client.badssl.com/'))
print(session.get('https://client.badssl.com/'))

Which correctly outputs:

<Response [400]>
<Response [200]>
<Response [200]>
<Response [400]>
<Response [400]>

Instead of the previous output:

<Response [400]>
<Response [400]>
<Response [400]>
<Response [400]>
<Response [400]>

@nateprewitt nateprewitt changed the base branch from master to main January 3, 2022 15:28
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.

Client Side Certs with session
1 participant