Identicon
Identicon

Reputation: 403

"ConnectionResetError(104, 'Connection reset by peer')" in urllib3 v2.2.1 but not in v1.26.12

Here's the code:

import requests

r = requests.get("https://www.dubaipolice.gov.ae/", verify=False)

Works just fine on urllib3 v1.26.12, but not on v2.2.1. Any ideas?

Python v3.10.12 | Requests v2.32.3 | OS: Ubuntu 22.04 & Windows 10

Full error tracebacks:

Ubuntu 22.04 traceback: https://pastebin.com/raw/pkezNCqJ

Windows 10 traceback: https://pastebin.com/raw/GXfKyNaz

Edit - Upon further investigation I find that this problem starts with urllib3 v2.x onwards. All versions till v1.26.19 work just fine & don't give any error.

Upvotes: 0

Views: 108

Answers (0)

Related Questions