requests icon indicating copy to clipboard operation
requests copied to clipboard

Reuse ssl.SSLContext across all SSL connections within a requests.Sesssion

Open alex opened this issue 8 years ago • 4 comments
trafficstars

requests should pass ssl_context to urllib3.PoolManager: https://github.com/requests/requests/blob/2a4dd64fb4c072c646277c9d057737b05351b86f/requests/adapters.py#L161-L162

Otherwise a new SSLContext is allocated for all requests. SSLContexsts can be huge, like 1MB, so doing this will be a performance and memory usage win.

alex avatar Oct 02 '17 18:10 alex

It looks like Requests doesn't define ssl_context anywhere. Where should it be created?

Stevoisiak avatar Jun 25 '18 16:06 Stevoisiak

How is the status of this issue?

wagnerluis1982 avatar Jan 17 '21 02:01 wagnerluis1982

Hello, me and my group mates are going to be working on this issue.

echo4eva avatar Oct 14 '21 20:10 echo4eva

@alex Could you tell me where you have an instance of ssl_context within the code? Thank you.

Echo-Lima-India avatar Oct 20 '21 01:10 Echo-Lima-India