'The L{Deferred} returned by L{HTTP11ClientProtocol.request} will fire
with a L{ResponseFailed} failure containing a L{CancelledError}
exception if the request was cancelled before all response headers were
received.'

def test_cancelDuringResponse(self):

    transport = StringTransport()
    protocol = HTTP11ClientProtocol()
    protocol.makeConnection(transport)
    result = protocol.request(Request('GET', '/', _boringHeaders, None))
    protocol.dataReceived('HTTP/1.1    200    OK\r\n')
    result.cancel()
    self.assertTrue(transport.aborting)
    return assertResponseFailed(self, result, [CancelledError])
