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

def test_cancelBeforeResponse(self):

    transport = StringTransport()
    protocol = HTTP11ClientProtocol()
    protocol.makeConnection(transport)
    result = protocol.request(Request('GET', '/', _boringHeaders, None))
    result.cancel()
    self.assertTrue(transport.aborting)
    return assertWrapperExceptionTypes(self, result, ResponseNeverReceived, [CancelledError])
