ClientHttpRequest::noteBodyProducerAborted(BodyPipe::Pointer)
{
    assert(!virginHeadSource);
    stopConsumingFrom(adaptedBodySource);

    debugs(85,3, HERE << "REQMOD body production failed");
    if (request_satisfaction_mode) { // too late to recover or serve an error
        static const auto d = MakeNamedErrorDetail("CLT_REQMOD_RESP_BODY");
        request->detailError(ERR_ICAP_FAILURE, d);
        const Comm::ConnectionPointer c = getConn()->clientConnection;
        Must(Comm::IsConnOpen(c));
        c->close(); // drastic, but we may be writing a response already
    } else {
        static const auto d = MakeNamedErrorDetail("CLT_REQMOD_REQ_BODY");
        handleAdaptationFailure(d);
    }
}
ClientHttpRequest::noteBodyProducerAborted(BodyPipe::Pointer)
{
    assert(!virginHeadSource);
    stopConsumingFrom(adaptedBodySource);

    debugs(85,3, HERE << "REQMOD body production failed");
    if (request_satisfaction_mode) {  
        static const auto d = MakeNamedErrorDetail("CLT_REQMOD_RESP_BODY");
        request->detailError(ERR_ICAP_FAILURE, d);
        const Comm::ConnectionPointer c = getConn()->clientConnection;
        Must(Comm::IsConnOpen(c));
        c->close();  
    } else {
        static const auto d = MakeNamedErrorDetail("CLT_REQMOD_REQ_BODY");
        handleAdaptationFailure(d);
    }
}