33 lines
1.5 KiB
Diff
33 lines
1.5 KiB
Diff
Index: urllib3-2.1.0/changelog/3268.bugfix.rst
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ urllib3-2.1.0/changelog/3268.bugfix.rst
|
|
@@ -0,0 +1 @@
|
|
+Fixed handling of OpenSSL 3.2.0 new error message for misconfiguring an HTTP proxy as HTTPS.
|
|
Index: urllib3-2.1.0/src/urllib3/connection.py
|
|
===================================================================
|
|
--- urllib3-2.1.0.orig/src/urllib3/connection.py
|
|
+++ urllib3-2.1.0/src/urllib3/connection.py
|
|
@@ -864,6 +864,7 @@ def _wrap_proxy_error(err: Exception, pr
|
|
is_likely_http_proxy = (
|
|
"wrong version number" in error_normalized
|
|
or "unknown protocol" in error_normalized
|
|
+ or "record layer failure" in error_normalized
|
|
)
|
|
http_proxy_warning = (
|
|
". Your proxy appears to only use HTTP and not HTTPS, "
|
|
Index: urllib3-2.1.0/test/with_dummyserver/test_socketlevel.py
|
|
===================================================================
|
|
--- urllib3-2.1.0.orig/test/with_dummyserver/test_socketlevel.py
|
|
+++ urllib3-2.1.0/test/with_dummyserver/test_socketlevel.py
|
|
@@ -1297,7 +1297,8 @@ class TestSSL(SocketDummyServerTestCase)
|
|
self._start_server(socket_handler)
|
|
with HTTPSConnectionPool(self.host, self.port, ca_certs=DEFAULT_CA) as pool:
|
|
with pytest.raises(
|
|
- SSLError, match=r"(wrong version number|record overflow)"
|
|
+ SSLError,
|
|
+ match=r"(wrong version number|record overflow|record layer failure)",
|
|
):
|
|
pool.request("GET", "/", retries=False)
|
|
|