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