def test_contentLengthAndTransferEncoding(self):
        finished = []
        protocol = HTTPClientParser(
            Request(b'GET', b'/', _boringHeaders, None), finished.append)
        transport = StringTransport()
        protocol.makeConnection(transport)
        protocol.dataReceived(b'HTTP/1.1 200 OK\r\n')

        body = []
        protocol.response._bodyDataReceived = body.append

        protocol.dataReceived(
            b'Content-Length: 102\r\n'
            b'Transfer-Encoding: chunked\r\n'
            b'\r\n'
            b'3\r\n'
            b'abc\r\n'
            b'0\r\n'
            b'\r\n')

        self.assertEqual(body, [b'abc'])
        self.assertEqual(finished, [b''])
According to RFC 2616, section 4.4, point 3, if I{Content-Length} and
dataset/ETHPy150Open twisted/twisted/twisted/web/test/test_newclient.py/HTTPClientParserTests.test_contentLengthAndTransferEncoding