Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTTPS websites with system-wide HTTP proxy on Windows #6162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 11, 2022

  1. Fix HTTPS websites with system-wide HTTP proxy on Windows

    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 committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    8c86fb1 View commit details
    Browse the repository at this point in the history