Commit 74c458a7 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

requests: fixing the connection pool for HTTPS

The HTTPS pool must be distinct from the HTTP pool,
presumably because this connection notion already
includes TLS (by contrast with raw sockets).

Amazingly, heptapod-tests had not been used over
HTTPS since the first preflight tests of foss.h.n until now.

--HG--
branch : stable
parent 7aeafe8b27d8
Pipeline #17977 passed with stages
in 20 minutes and 33 seconds
......@@ -17,5 +17,15 @@ class HTTPConnectionPool(connectionpool.HTTPConnectionPool):
super(HTTPConnectionPool, self).__init__(*args, **kwargs)
class HTTPSConnectionPool(connectionpool.HTTPSConnectionPool):
def __init__(self, *args, **kwargs):
# this block=True will avoid hard failures if the pool is full,
# but there's still something that flips it back to False sometimes
# in those tests.
kwargs.update(maxsize=MAX_CONN, block=True)
super(HTTPSConnectionPool, self).__init__(*args, **kwargs)
registry = poolmanager.pool_classes_by_scheme
registry['http'] = registry['https'] = HTTPConnectionPool
registry['http'] = HTTPConnectionPool
registry['https'] = HTTPSConnectionPool
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment