Lines Matching refs:code
81 # signalled? The client needs to know the HTTP error code. But if
154 def __init__(self, url, code, msg, hdrs, fp):
155 self.code = code
165 self.__super_init(fp, hdrs, url, code)
168 return 'HTTP Error %s: %s' % (self.code, self.msg)
517 code, msg, hdrs = response.code, response.msg, response.info()
519 # According to RFC 2616, "2xx" code indicates that the client's
521 if not (200 <= code < 300):
523 'http', request, response, code, msg, hdrs)
530 def http_error_default(self, req, fp, code, msg, hdrs):
531 raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
541 def redirect_request(self, req, fp, code, msg, headers, newurl):
552 if (code in (301, 302, 303, 307) and m in ("GET", "HEAD")
553 or code in (301, 302, 303) and m == "POST"):
569 raise HTTPError(req.get_full_url(), code, msg, headers, fp)
575 def http_error_302(self, req, fp, code, msg, headers):
600 raise HTTPError(newurl, code,
608 new = self.redirect_request(req, fp, code, msg, headers, newurl)
618 raise HTTPError(req.get_full_url(), code,
873 if response and response.code != 401:
894 def http_error_401(self, req, fp, code, msg, headers):
906 def http_error_407(self, req, fp, code, msg, headers):
1082 def http_error_401(self, req, fp, code, msg, headers):
1095 def http_error_407(self, req, fp, code, msg, headers):
1147 - code: HTTP status code
1199 # XXX It might be better to extract the read buffering code
1206 resp.code = r.status