Shashwat Anand <anand.shash...@gmail.com> added the comment: In Python 2.7a3+, trunk:78165 the code is as follows: (note that there is a segment of code to fix malformed URLs)
""" if 'location' in headers: newurl = headers.getheaders('location')[0] elif 'uri' in headers: newurl = headers.getheaders('uri')[0] else: return # fix a possible malformed URL urlparts = urlparse.urlparse(newurl) if not urlparts.path: urlparts = list(urlparts) urlparts[2] = "/" newurl = urlparse.urlunparse(urlparts) newurl = urlparse.urljoin(req.get_full_url(), newurl) """ ---------- nosy: +l0nwlf _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7920> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com