code: def http_error_default(self, url, fp, errcode, errmsg, headers):
          
          fp.close()
          raise HTTPError(url, errcode, errmsg, headers, None)
docs: Default error handler: close the connection and raise IOError.