reloc_dict = {
- 301: "perm.",
+ 301: "perm1.",
302: "temp2.",
303: "temp3.",
307: "temp7.",
+ 308: "temp8.",
"html": "html"
}
http_error_303 = http_error_301
# Error 307 -- relocated (temporarily)
http_error_307 = http_error_301
+ # Error 308 -- relocated (permanently)
+ http_error_308 = http_error_301
# Error 401 -- authentication required
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):
response = urllib2.urlopen(request)
except urllib2.HTTPError as e:
- if e.code in (301, 302, 303, 307):
+ if e.code in (301, 302, 303, 307, 308):
return None, e.code, e.hdrs['Location'], None, None
else:
self.log(' HTTP Error %s: %s' % (e.code, e.msg))
http_error_303 = http_error_301
# Error 307 -- relocated (temporarily)
http_error_307 = http_error_301
+ # Error 308 -- relocated (permanently)
+ http_error_308 = http_error_301
# Error 401 -- authentication required
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):