def test_connectionHeaders(self):
        protocol = HTTPClientParser(
            Request('GET', '/', _boringHeaders, None),
            lambda rest: None)
        protocol.makeConnection(StringTransport())
        protocol.dataReceived('HTTP/1.1 200 OK\r\n')
        protocol.dataReceived('Content-Length: 123\r\n')
        protocol.dataReceived('Connection: close\r\n')
        protocol.dataReceived('\r\n')
        self.assertEqual(
            protocol.response.headers,
            Headers({}))
        self.assertEqual(
            protocol.connHeaders,
            Headers({'content-length': ['123'],
                     'connection': ['close']}))
        self.assertEqual(protocol.response.length, 123)
The connection control headers are added to the parser's C{connHeaders}
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/HTTPClientParserTests.test_connectionHeaders