This file complements the urllib2 class hierarchy with custom classes.
For instance, we create a new HTTPConnection and HTTPSConnection that inherit from the original urllib2.HTTP(s)Connection objects, but also have a new base which implements a custom getresponse and cleanup_pipe handlers.
And then we implement custom HTTPHandler and HTTPSHandler classes, that use the custom HTTPConnection classes.
We have a custom Response class, which lets us maintain a keep-alive connection even for requests that urllib2 doesn't expect to contain body data.
And a custom Request class that lets us track redirections, and handle authentication schemes.
For coherency with python libraries, we use capitalized header names throughout the code, even if the header names will be titled just before sending the request (see AbstractHTTPHandler.do_open).
Class | addinfourl | Replacement addinfourl class compatible with python-2.7's xmlrpclib |
Class | Response | Custom HTTPResponse, to avoid the need to decorate. |
Class | AbstractHTTPConnection | A custom HTTP(S) Connection, which can reset itself on a bad response |
Class | HTTPConnection | Undocumented |
Class | HTTPSConnection | Undocumented |
Class | Request | A custom Request object. |
Class | ConnectionHandler | Provides connection-sharing by pre-processing requests. |
Class | AbstractHTTPHandler | A custom handler for HTTP(S) requests. |
Class | HTTPHandler | A custom handler that just thunks into HTTPConnection |
Class | HTTPSHandler | A custom handler that just thunks into HTTPSConnection |
Class | HTTPRedirectHandler | Handles redirect requests. |
Class | ProxyHandler | Handles proxy setting. |
Class | AbstractAuthHandler | A custom abstract authentication handler for all http authentications. |
Class | NegotiateAuthHandler | A authentication handler that handles WWW-Authenticate: Negotiate. |
Class | BasicAuthHandler | A custom basic authentication handler. |
Function | get_digest_algorithm_impls | Undocumented |
Function | get_new_cnonce | Undocumented |
Class | DigestAuthHandler | A custom digest authentication handler. |
Class | HTTPAuthHandler | Custom http authentication handler. |
Class | ProxyAuthHandler | Custom proxy authentication handler. |
Class | HTTPBasicAuthHandler | Custom http basic authentication handler |
Class | ProxyBasicAuthHandler | Custom proxy basic authentication handler |
Class | HTTPDigestAuthHandler | Custom http basic authentication handler |
Class | ProxyDigestAuthHandler | Custom proxy basic authentication handler |
Class | HTTPNegotiateAuthHandler | Custom http negotiate authentication handler |
Class | ProxyNegotiateAuthHandler | Custom proxy negotiate authentication handler |
Class | HTTPErrorProcessor | Process HTTP error responses. |
Class | HTTPDefaultErrorHandler | Translate common errors into bzr Exceptions |
Class | Opener | A wrapper around urllib2.build_opener |
Class | _ReportingFileSocket | Undocumented |
Class | _ReportingSocket | Undocumented |
Function | _ssl_wrap_socket | Undocumented |
Class | _ConnectRequest | No class docstring; 2/3 methods documented |