Issue 14767: urllib.request.HTTPRedirectHandler raises HTTPError when Location header is relative (original ) (raw ) Issue14767
Created on 2012-05-10 01:28 by jspenguin , last changed 2022-04-11 14:57 by admin . This issue is now closed .
Files
File name
Uploaded
Description
Edit
rel_redirect.py
jspenguin,2012-05-10 01:28
Test script
Messages (3)
msg160319 - (view)
Author: jspenguin (jspenguin)
Date: 2012-05-10 01:28
If a server returns a relative URL in the 'Location:' header, HTTPRedirectHandler will fail because it checks the scheme of the URL before it calls urljoin() to convert it to an absolute URL.
msg160330 - (view)
Author: Antoine Pitrou (pitrou) *
Date: 2012-05-10 09:24
See . Seems like a common request.
msg240463 - (view)
Author: Martin Panter (martin.panter) *
Date: 2015-04-11 06:33
Looks like this was a 3.2 regression, but was fixed in Issue 13696 .