'If a response includes a I{Content-Length} header indicating zero bytes
in the response, L{Response.length} is set accordingly and no data is
delivered to L{Response._bodyDataReceived}.'

def test_zeroContentLength(self):

    finished = []
    protocol = HTTPClientParser(Request('GET', '/', _boringHeaders, None), finished.append)
    protocol.makeConnection(StringTransport())
    protocol.dataReceived('HTTP/1.1    200    OK\r\n')
    body = []
    protocol.response._bodyDataReceived = body.append
    protocol.dataReceived('Content-Length:    0\r\n')
    protocol.dataReceived('\r\n')
    self.assertEqual(protocol.state, DONE)
    self.assertEqual(body, [])
    self.assertEqual(finished, [''])
    self.assertEqual(protocol.response.length, 0)
