New submission from John McKay:

After getting a sucessfull response, _open_generic_http will overwrite the the 
start of the url to be http: regardless of if it was called from open_http() or 
open_https(). This causes it to appear as if you were redirected to a 
non-secure site if you check the url properly after an open request. This is 
especially problematic after being redirected; it appears you were redirected 
to an insecure version of the site.

Attached is a patch to resolve this. It uses the type, which should be 
correctly set to http or https based on the calling context.

----------
components: Library (Lib)
files: urllib.patch
keywords: patch
messages: 231702
nosy: John.McKay
priority: normal
severity: normal
status: open
title: urllib gives incorrect url after open when using HTTPS
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37283/urllib.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22946>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to