'If a response does not include a I{Transfer-Encoding} or a
I{Content-Length}, the end of response body is indicated by the
connection being closed.'

def test_unknownContentLength(self):

    finished = []
    protocol = HTTPClientParser(Request('GET', '/', _boringHeaders, None), finished.append)
    transport = StringTransport()
    protocol.makeConnection(transport)
    protocol.dataReceived('HTTP/1.1    200    OK\r\n')
    body = []
    protocol.response._bodyDataReceived = body.append
    protocol.dataReceived('\r\n')
    protocol.dataReceived('foo')
    protocol.dataReceived('bar')
    self.assertEqual(body, ['foo', 'bar'])
    protocol.connectionLost(ConnectionDone(u'simulated    end    of    connection'))
    self.assertEqual(finished, [''])
