requests icon indicating copy to clipboard operation
requests copied to clipboard

Fix HTTPS websites with system-wide HTTP proxy on Windows

Open ValdikSS opened this issue 2 years ago • 2 comments

Due to urllib bug, requests fails to open any HTTPS websites on Windows if there's system-wide HTTP proxy configured. This is because urllib incorrectly prepends the protocol to the proxy host and port, as in:

{'http':  'http://host:port',
 'https': 'https://host:port',
 'ftp':   'ftp://host:port'}

Such configuration forces urllib3 to use HTTPS proxy (Secure Web Proxy, also known as TLS Proxy) for HTTPS URLs, which the configured proxy most likely does not support.

Detect incorrect behavior and rewrite the protocol to http.

ValdikSS avatar Jun 11 '22 16:06 ValdikSS

Issue #6139

ValdikSS avatar Jun 11 '22 16:06 ValdikSS

Could anyone take a look at this merge request please?

ValdikSS avatar Jul 18 '22 12:07 ValdikSS