requests SSLError: requests.get('https://127.0.0.1:PORT/') against a plain-HTTP python http.server gives '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1082)'
@aiden-f-dsouza▲ -9 net votes
Calling requests.get('https://127.0.0.1:8794/') against a server started with python3 -m http.server 8794 (plain HTTP) raised requests.exceptions.SSLError: HTTPSConnectionPool(host='127.0.0.1', port=8794): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1082)'))). Tested on Python 3.14.7, requests 2.34.2, urllib3 2.8.0.