Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Str Num Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Num Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad Str Num Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Num Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Num Return TupleLoad NameLoad Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr Str comprehension NameStore NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad Str body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Dict Str Str Assign NameStore BinOpAdd Str AttributeLoad NameLoad attr Return Call NameLoad NameLoad NameLoad Str NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore ListLoad BinOpMod Str TupleLoad NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Slice Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Dict Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Num Str ListLoad TupleLoad Str ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Num Str ListLoad TupleLoad Str ListLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Num Str ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Return Call AttributeLoad NameLoad attr Num Str ListLoad TupleLoad Str ListLoad Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Return Call AttributeLoad NameLoad attr Num Str ListLoad TupleLoad Str ListLoad Call NameLoad Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Str Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Str Delete SubscriptDel NameLoad Index Str Assign NameStore Call NameLoad Str Str Str NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str Str ListLoad Str ListLoad Str ListLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Num Str Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad ListLoad Str Assign NameStore Call NameLoad Str Str Str Dict Str Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad TupleLoad Str ListLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Str Str Dict Str Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Num Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Str Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Num Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str decorator_list decorator_list
N/A N/A 
Test for L{twisted.web.proxy}.
 twisted.trial.unittest TestCase twisted.test.proto_helpers StringTransportWithDisconnection twisted.test.proto_helpers MemoryReactor twisted.web.resource Resource twisted.web.server Site twisted.web.proxy ReverseProxyResource ProxyClientFactory twisted.web.proxy ProxyClient ProxyRequest ReverseProxyRequest twisted.web.test.test_web DummyRequest ReverseProxyResourceTests N/A TestCase N/A N/A 
    Tests for L{ReverseProxyResource}.
     _testRender N/A N/A self uri expectedURI N/A N/A N/A 
        Check that a request pointing at C{uri} produce a new proxy connection,
        with the path of this request pointing at C{expectedURI}.
         N/A root N/A Resource N/A reactor N/A MemoryReactor N/A resource N/A ReverseProxyResource 127.0.0.1 1234 /path reactor N/A N/A N/A root putChild index resource N/A site N/A Site root N/A transport N/A StringTransportWithDisconnection N/A channel N/A N/A site buildProtocol None N/A N/A N/A channel makeConnection transport N/A N/A N/A self addCleanup N/A channel connectionLost None N/A N/A N/A channel dataReceived N/A GET %s HTTP/1.1
Accept: text/html

 N/A uri N/A N/A N/A self assertEqual N/A len N/A reactor tcpClients 1 N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 0 127.0.0.1 N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 1 1234 N/A factory N/A N/A N/A reactor tcpClients N/A 0 N/A 2 N/A N/A N/A self assertIsInstance factory ProxyClientFactory N/A N/A N/A self assertEqual N/A factory rest expectedURI N/A N/A N/A self assertEqual N/A N/A factory headers N/A host 127.0.0.1:1234 N/A test_render N/A N/A self N/A N/A N/A 
        Test that L{ReverseProxyResource.render} initiates a connection to the
        given server with a L{ProxyClientFactory} as parameter.
         N/A N/A N/A self _testRender /index /path N/A test_renderWithQuery N/A N/A self N/A N/A N/A 
        Test that L{ReverseProxyResource.render} passes query parameters to the
        created factory.
         N/A N/A N/A self _testRender /index?foo=bar /path?foo=bar N/A test_getChild N/A N/A self N/A N/A N/A 
        The L{ReverseProxyResource.getChild} method should return a resource
        instance with the same class as the originating resource, forward
        port, host, and reactor values, and update the path value with the
        value passed.
         N/A reactor N/A MemoryReactor N/A resource N/A ReverseProxyResource 127.0.0.1 1234 /path reactor N/A child N/A N/A resource getChild foo None N/A N/A N/A self assertIsInstance child ReverseProxyResource N/A N/A N/A self assertEqual N/A child path /path/foo N/A N/A N/A self assertEqual N/A child port 1234 N/A N/A N/A self assertEqual N/A child host 127.0.0.1 N/A N/A N/A self assertIdentical N/A child reactor N/A resource reactor N/A test_getChildWithSpecial N/A N/A self N/A N/A N/A 
        The L{ReverseProxyResource} return by C{getChild} has a path which has
        already been quoted.
         N/A resource N/A ReverseProxyResource 127.0.0.1 1234 /path N/A child N/A N/A resource getChild  /% None N/A N/A N/A self assertEqual N/A child path /path/%20%2F%25 N/A N/A DummyChannel N/A object N/A N/A 
    A dummy HTTP channel, that does nothing but holds a transport and saves
    connection lost.

    @ivar transport: the transport used by the client.
    @ivar lostReason: the reason saved at connection lost.
     __init__ N/A N/A self transport N/A N/A N/A 
        Hold a reference to the transport.
         N/A N/A self transport transport N/A N/A self lostReason None N/A connectionLost N/A N/A self reason N/A N/A N/A 
        Keep track of the connection lost reason.
         N/A N/A self lostReason reason N/A N/A ProxyClientTests N/A TestCase N/A N/A 
    Tests for L{ProxyClient}.
     _parseOutHeaders N/A N/A self content N/A N/A N/A 
        Parse the headers out of some web content.

        @param content: Bytes received from a web server.
        @return: A tuple of (requestLine, headers, body). C{headers} is a dict
            of headers, C{requestLine} is the first line (e.g. "POST /foo ...")
            and C{body} is whatever is left.
         N/A N/A headers body N/A N/A content split N/A headers N/A N/A headers split N/A requestLine N/A N/A headers pop 0 N/A N/A requestLine N/A dict N/A N/A N/A header split :  N/A header headers body N/A makeRequest N/A N/A self path N/A N/A N/A 
        Make a dummy request object for the URL path.

        @param path: A URL path, beginning with a slash.
        @return: A L{DummyRequest}.
         N/A N/A DummyRequest path N/A makeProxyClient N/A N/A self request method headers requestBody N/A GET None N/A N/A 
        Make a L{ProxyClient} object used for testing.

        @param request: The request to use.
        @param method: The HTTP method to use, GET by default.
        @param headers: The HTTP headers to use expressed as a dict. If not
            provided, defaults to {'accept': 'text/html'}.
        @param requestBody: The body of the request. Defaults to the empty
            string.
        @return: A L{ProxyClient}
         N/A N/A headers None N/A N/A headers N/A accept text/html N/A path N/A / N/A request postpath N/A N/A ProxyClient method path HTTP/1.0 headers requestBody request N/A connectProxy N/A N/A self proxyClient N/A N/A N/A 
        Connect a proxy client to a L{StringTransportWithDisconnection}.

        @param proxyClient: A L{ProxyClient}.
        @return: The L{StringTransportWithDisconnection}.
         N/A clientTransport N/A StringTransportWithDisconnection N/A N/A clientTransport protocol proxyClient N/A N/A N/A proxyClient makeConnection clientTransport N/A clientTransport N/A assertForwardsHeaders N/A N/A self proxyClient requestLine headers N/A N/A N/A 
        Assert that C{proxyClient} sends C{headers} when it connects.

        @param proxyClient: A L{ProxyClient}.
        @param requestLine: The request line we expect to be sent.
        @param headers: A dict of headers we expect to be sent.
        @return: If the assertion is successful, return the request body as
            bytes.
         N/A N/A N/A self connectProxy proxyClient N/A requestContent N/A N/A N/A proxyClient transport value N/A N/A receivedLine receivedHeaders body N/A N/A self _parseOutHeaders requestContent N/A N/A N/A self assertEqual receivedLine requestLine N/A N/A N/A self assertEqual receivedHeaders headers N/A body N/A makeResponseBytes N/A N/A self code message headers body N/A N/A N/A lines N/A N/A HTTP/1.0 %d %s N/A code message N/A N/A header values headers N/A N/A value values N/A N/A N/A N/A lines append N/A %s: %s N/A header value N/A N/A N/A lines extend N/A body N/A N/A N/A join lines N/A assertForwardsResponse N/A N/A self request code message headers body N/A N/A N/A 
        Assert that C{request} has forwarded a response from the server.

        @param request: A L{DummyRequest}.
        @param code: The expected HTTP response code.
        @param message: The expected HTTP message.
        @param headers: The expected HTTP headers.
        @param body: The expected response body.
         N/A N/A N/A self assertEqual N/A request responseCode code N/A N/A N/A self assertEqual N/A request responseMessage message N/A receivedHeaders N/A list N/A N/A N/A request responseHeaders getAllRawHeaders N/A N/A N/A receivedHeaders sort N/A expectedHeaders N/A headers N/A N/A N/A N/A expectedHeaders sort N/A N/A N/A self assertEqual receivedHeaders expectedHeaders N/A N/A N/A self assertEqual N/A N/A join N/A request written body N/A _testDataForward N/A N/A self code message headers body method requestBody loseConnection N/A GET True N/A N/A 
        Build a fake proxy connection, and send C{data} over it, checking that
        it's forwarded to the originating request.
         N/A request N/A N/A self makeRequest foo N/A client N/A N/A self makeProxyClient request method N/A accept text/html requestBody N/A receivedBody N/A N/A self assertForwardsHeaders client N/A %s /foo HTTP/1.0 N/A method N/A connection accept close text/html N/A N/A N/A self assertEqual receivedBody requestBody N/A N/A N/A client dataReceived N/A N/A self makeResponseBytes code message headers body N/A N/A N/A self assertForwardsResponse request code message headers body N/A loseConnection N/A N/A N/A N/A N/A client transport loseConnection N/A N/A N/A self assertFalse N/A N/A client transport connected N/A N/A N/A self assertEqual N/A request finished 1 N/A test_forward N/A N/A self N/A N/A N/A 
        When connected to the server, L{ProxyClient} should send the saved
        request, with modifications of the headers, and then forward the result
        to the parent request.
         N/A N/A N/A self _testDataForward 200 OK N/A N/A Foo N/A bar baz Some data
 N/A test_postData N/A N/A self N/A N/A N/A 
        Try to post content in the request, and check that the proxy client
        forward the body of the request.
         N/A N/A N/A self _testDataForward 200 OK N/A N/A Foo N/A bar Some data
 POST Some content N/A test_statusWithMessage N/A N/A self N/A N/A N/A 
        If the response contains a status with a message, it should be
        forwarded to the parent request with all the information.
         N/A N/A N/A self _testDataForward 404 Not Found N/A N/A test_contentLength N/A N/A self N/A N/A N/A 
        If the response contains a I{Content-Length} header, the inbound
        request object should still only have C{finish} called on it once.
         N/A data foo bar baz N/A N/A N/A self _testDataForward 200 OK N/A N/A Content-Length N/A N/A str N/A len data data N/A test_losesConnection N/A N/A self N/A N/A N/A 
        If the response contains a I{Content-Length} header, the outgoing
        connection is closed when all response body data has been received.
         N/A data foo bar baz N/A N/A N/A self _testDataForward 200 OK N/A N/A Content-Length N/A N/A str N/A len data data loseConnection False N/A test_headersCleanups N/A N/A self N/A N/A N/A 
        The headers given at initialization should be modified:
        B{proxy-connection} should be removed if present, and B{connection}
        should be added.
         N/A client N/A ProxyClient GET /foo HTTP/1.0 N/A accept proxy-connection text/html foo None N/A N/A N/A self assertEqual N/A client headers N/A accept connection text/html close N/A test_keepaliveNotForwarded N/A N/A self N/A N/A N/A 
        The proxy doesn't really know what to do with keepalive things from
        the remote server, so we stomp over any keepalive header we get from
        the client.
         N/A headers N/A accept keep-alive connection text/html 300 keep-alive N/A expectedHeaders N/A N/A headers copy N/A N/A expectedHeaders N/A connection close N/A N/A expectedHeaders N/A keep-alive N/A client N/A ProxyClient GET /foo HTTP/1.0 headers None N/A N/A N/A self assertForwardsHeaders client GET /foo HTTP/1.0 expectedHeaders N/A test_defaultHeadersOverridden N/A N/A self N/A N/A N/A 
        L{server.Request} within the proxy sets certain response headers by
        default. When we get these headers back from the remote server, the
        defaults are overridden rather than simply appended.
         N/A request N/A N/A self makeRequest foo N/A N/A N/A N/A request responseHeaders setRawHeaders server N/A old-bar N/A N/A N/A N/A request responseHeaders setRawHeaders date N/A old-baz N/A N/A N/A N/A request responseHeaders setRawHeaders content-type N/A old/qux N/A client N/A N/A self makeProxyClient request headers N/A accept text/html N/A N/A N/A self connectProxy client N/A headers N/A Server Date Content-Type N/A bar N/A 2010-01-01 N/A application/x-baz N/A N/A N/A client dataReceived N/A N/A self makeResponseBytes 200 OK N/A N/A headers items N/A N/A N/A self assertForwardsResponse request 200 OK N/A N/A headers items N/A N/A ProxyClientFactoryTests N/A TestCase N/A N/A 
    Tests for L{ProxyClientFactory}.
     test_connectionFailed N/A N/A self N/A N/A N/A 
        Check that L{ProxyClientFactory.clientConnectionFailed} produces
        a B{501} response to the parent request.
         N/A request N/A DummyRequest N/A foo N/A factory N/A ProxyClientFactory GET /foo HTTP/1.0 N/A accept text/html request N/A N/A N/A factory clientConnectionFailed None None N/A N/A N/A self assertEqual N/A request responseCode 501 N/A N/A N/A self assertEqual N/A request responseMessage Gateway error N/A N/A N/A self assertEqual N/A list N/A N/A N/A request responseHeaders getAllRawHeaders N/A N/A Content-Type N/A text/html N/A N/A N/A self assertEqual N/A N/A join N/A request written <H1>Could not connect</H1> N/A N/A N/A self assertEqual N/A request finished 1 N/A test_buildProtocol N/A N/A self N/A N/A N/A 
        L{ProxyClientFactory.buildProtocol} should produce a L{ProxyClient}
        with the same values of attributes (with updates on the headers).
         N/A factory N/A ProxyClientFactory GET /foo HTTP/1.0 N/A accept text/html Some data None N/A proto N/A N/A factory buildProtocol None N/A N/A N/A self assertIsInstance proto ProxyClient N/A N/A N/A self assertEqual N/A proto command GET N/A N/A N/A self assertEqual N/A proto rest /foo N/A N/A N/A self assertEqual N/A proto data Some data N/A N/A N/A self assertEqual N/A proto headers N/A accept connection text/html close N/A N/A ProxyRequestTests N/A TestCase N/A N/A 
    Tests for L{ProxyRequest}.
     _testProcess N/A N/A self uri expectedURI method data N/A GET N/A N/A 
        Build a request pointing at C{uri}, and check that a proxied request
        is created, pointing a C{expectedURI}.
         N/A transport N/A StringTransportWithDisconnection N/A channel N/A DummyChannel transport N/A reactor N/A MemoryReactor N/A request N/A ProxyRequest channel False reactor N/A N/A N/A request gotLength N/A len data N/A N/A N/A request handleContentChunk data N/A N/A N/A request requestReceived method N/A http://example.com%s N/A uri HTTP/1.0 N/A N/A N/A self assertEqual N/A len N/A reactor tcpClients 1 N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 0 example.com N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 1 80 N/A factory N/A N/A N/A reactor tcpClients N/A 0 N/A 2 N/A N/A N/A self assertIsInstance factory ProxyClientFactory N/A N/A N/A self assertEqual N/A factory command method N/A N/A N/A self assertEqual N/A factory version HTTP/1.0 N/A N/A N/A self assertEqual N/A factory headers N/A host example.com N/A N/A N/A self assertEqual N/A factory data data N/A N/A N/A self assertEqual N/A factory rest expectedURI N/A N/A N/A self assertEqual N/A factory father request N/A test_process N/A N/A self N/A N/A N/A 
        L{ProxyRequest.process} should create a connection to the given server,
        with a L{ProxyClientFactory} as connection factory, with the correct
        parameters:
            - forward comment, version and data values
            - update headers with the B{host} value
            - remove the host from the URL
            - pass the request as parent request
         N/A N/A N/A self _testProcess /foo/bar /foo/bar N/A test_processWithoutTrailingSlash N/A N/A self N/A N/A N/A 
        If the incoming request doesn't contain a slash,
        L{ProxyRequest.process} should add one when instantiating
        L{ProxyClientFactory}.
         N/A N/A N/A self _testProcess / N/A test_processWithData N/A N/A self N/A N/A N/A 
        L{ProxyRequest.process} should be able to retrieve request body and
        to forward it.
         N/A N/A N/A self _testProcess /foo/bar /foo/bar POST Some content N/A test_processWithPort N/A N/A self N/A N/A N/A 
        Check that L{ProxyRequest.process} correctly parse port in the incoming
        URL, and create a outgoing connection with this port.
         N/A transport N/A StringTransportWithDisconnection N/A channel N/A DummyChannel transport N/A reactor N/A MemoryReactor N/A request N/A ProxyRequest channel False reactor N/A N/A N/A request gotLength 0 N/A N/A N/A request requestReceived GET http://example.com:1234/foo/bar HTTP/1.0 N/A N/A N/A self assertEqual N/A len N/A reactor tcpClients 1 N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 0 example.com N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 1 1234 N/A N/A DummyFactory N/A object N/A N/A 
    A simple holder for C{host} and C{port} information.
     __init__ N/A N/A self host port N/A N/A N/A N/A self host host N/A N/A self port port N/A N/A ReverseProxyRequestTests N/A TestCase N/A N/A 
    Tests for L{ReverseProxyRequest}.
     test_process N/A N/A self N/A N/A N/A 
        L{ReverseProxyRequest.process} should create a connection to its
        factory host/port, using a L{ProxyClientFactory} instantiated with the
        correct parameters, and particularly set the B{host} header to the
        factory host.
         N/A transport N/A StringTransportWithDisconnection N/A channel N/A DummyChannel transport N/A reactor N/A MemoryReactor N/A request N/A ReverseProxyRequest channel False reactor N/A N/A request factory N/A DummyFactory example.com 1234 N/A N/A N/A request gotLength 0 N/A N/A N/A request requestReceived GET /foo/bar HTTP/1.0 N/A N/A N/A self assertEqual N/A len N/A reactor tcpClients 1 N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 0 example.com N/A N/A N/A self assertEqual N/A N/A N/A reactor tcpClients N/A 0 N/A 1 1234 N/A factory N/A N/A N/A reactor tcpClients N/A 0 N/A 2 N/A N/A N/A self assertIsInstance factory ProxyClientFactory N/A N/A N/A self assertEqual N/A factory headers N/A host example.com N/A N/A