b.t.h.HTTPServerRedirecting(http_server.HttpServer) : class documentation

Part of bzrlib.tests.http_utils View In Hierarchy

An HttpServer redirecting to another server
Method __init__ Constructor.
Method redirect_to Redirect all requests to a specific host:port
Method is_redirected Is the path redirected by this server.

Inherited from HttpServer:

Method create_server Undocumented
Method log Capture Server log output.
Method start_server See bzrlib.transport.Server.start_server.
Method get_url See bzrlib.transport.Server.get_url.
Method get_bogus_url See bzrlib.transport.Server.get_bogus_url.
Method _get_remote_url Undocumented

Inherited from TestingTCPServerInAThread (via HttpServer):

Method __repr__ Undocumented
Method run_server Undocumented
Method stop_server Remove the server and cleanup any resources it owns.
Method set_ignored_exceptions Install an exception handler for the server.
Method pending_exception Raise uncaught exception in the server.
def __init__(self, request_handler=RedirectRequestHandler, protocol_version=None):
Parametersrequest_handlera class that will be instantiated to handle an http connection (one or several requests).
protocol_versionif specified, will override the protocol version of the request handler.
def redirect_to(self, host, port):
Redirect all requests to a specific host:port
def is_redirected(self, path):
Is the path redirected by this server.
Parameterspaththe requested relative path
Returnsa tuple (code, target) if a matching redirection is found, (None, None) otherwise.
API Documentation for Bazaar, generated by pydoctor at 2020-07-07 00:53:25.