993
1005
if code in (301, 302, 303, 307):
994
1006
return Request(req.get_method(), newurl,
998
1010
# TODO: It will be nice to be able to
999
1011
# detect virtual hosts sharing the same
1000
1012
# IP address, that will allow us to
1001
1013
# share the same connection...
1006
raise urllib_request.HTTPError(req.get_full_url(), code, msg, headers, fp)
1019
req.get_full_url(), code, msg, headers, fp)
1008
1021
def http_error_302(self, req, fp, code, msg, headers):
1009
1022
"""Requests the redirected to URI.