classification
Title: method _tunnel does not allow for a standard proxy authentication solution
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: alexey.namyotkin, an7e, Вадим Новиков
Priority: normal Keywords:

Created on 2020-07-21 13:58 by alexey.namyotkin, last changed 2020-07-30 13:14 by Вадим Новиков.

Messages (1)
msg374067 - (view) Author: Alexey Namyotkin (alexey.namyotkin) Date: 2020-07-21 13:58
The _tunnel method of the HTTPConnection class in the http.client module, if the CONNECT request is unsuccessful, closes the connection and raises an OSError without returning the response data. This behavior does not allow to implement the authentication procedure on the proxy server using methods similar to those used for authentication on servers (using hooks). And at the moment proxy authentication (Kerberos, Digest, NTLM - all other than Basic) is not supported by the urllib3 and accordingly requests, pip and many others. As a result, a large number of people cannot use Python to create scripts that involve working on the Internet (if they don't know workarounds). This problem has been mentioned many times here (Issue 7291, 24333, 24964). There are many Issues related to this task in requests, urllib3, pip and other. This problem is many years old (at least 5), but there is still no complete solution (as far as I can tell). There are several workarounds, but there is still no solution that could be used in urllib3, requests, pip and other (in many discussions of Issues _tunnel method is indicated as a reason preventing a proxy authentication solution from being implemented). Hopefully someone can finally solve this problem or explain why it can't be solved
History
Date User Action Args
2020-07-30 13:14:58Вадим Новиковsetnosy: + Вадим Новиков
2020-07-21 15:52:03an7esetnosy: + an7e
2020-07-21 13:58:01alexey.namyotkincreate