When url scheme is changed when redirect (e. g. https -> http) https property of conn.connopts should be changed too. CONNECT method is used by default for https connections , when redirecting to http url, CONNECT method will be used too, because connopts is copied from previous connection. This behavior is wrong, because CONNECT method cant be used for http.
When url scheme is changed when redirect (e. g. https -> http) https property of conn.connopts should be changed too. CONNECT method is used by default for https connections , when redirecting to http url, CONNECT method will be used too, because connopts is copied from previous connection. This behavior is wrong, because CONNECT method cant be used for http.