#NEWLINE# def test_contentLengthAndTransferEncoding( self ) : #NEWLINE# #INDENT# '\n        According to RFC 2616, section 4.4, point 3, if I{Content-Length} and\n        I{Transfer-Encoding: chunked} are present, I{Content-Length} MUST be\n        ignored\n        ' #NEWLINE# finished = [ ] #NEWLINE# protocol = HTTPClientParser ( Request ( b'GET' , b'/' , _boringHeaders , None ) , finished . append ) #NEWLINE# transport = StringTransport ( ) #NEWLINE# protocol . makeConnection ( transport ) #NEWLINE# protocol . dataReceived ( b'HTTP/1.1 200 OK\r\n' ) #NEWLINE# body = [ ] #NEWLINE# protocol . response . _bodyDataReceived = body . append #NEWLINE# protocol . dataReceived ( b'Content-Length: 102\r\nTransfer-Encoding: chunked\r\n\r\n3\r\nabc\r\n0\r\n\r\n' ) #NEWLINE# self . assertEqual ( body , [ b'abc' ] ) #NEWLINE# self . assertEqual ( finished , [ b'' ] )