Part of bzrlib.transport.http._urllib2_wrappers View In Hierarchy
Known subclasses: bzrlib.transport.http._urllib2_wrappers.HTTPHandler, bzrlib.transport.http._urllib2_wrappers.HTTPSHandler
We overrive urllib2.AbstractHTTPHandler to get a better control of the connection, the ability to implement new request types and return a response able to cope with persistent connections.
Method | __init__ | Undocumented |
Method | http_request | Common headers setting |
Method | retry_or_raise | Retry the request (once) or raise the exception. |
Method | do_open | See urllib2.AbstractHTTPHandler.do_open for the general idea. |
urllib2 raises exception of application level kind, we just have to translate them.
httplib can raise exceptions of transport level (badly formatted dialog, loss of connexion or socket level problems). In that case we should issue the request again (httplib will close and reopen a new connection if needed).