return false;
debugs(11,5, HERE << "entry is not Accepting!");
- abortTransaction(abortReason);
+ abortOnData(abortReason);
return true;
}
handleRequestBodyProducerAborted();
}
+bool
+Client::abortOnData(const char *reason)
+{
+ abortAll(reason);
+ return true;
+}
+
// more origin request body data is available
void
Client::handleMoreRequestBodyAvailable()
err = new ErrorState(ERR_WRITE_ERROR, Http::scBadGateway, fwd->request);
err->xerrno = io.xerrno;
fwd->fail(err);
- abortTransaction("I/O error while sending request body");
+ abortOnData("I/O error while sending request body");
return;
}
if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) {
- abortTransaction("store entry aborted while sending request body");
+ abortOnData("store entry aborted while sending request body");
return;
}
// TODO: bypass if possible
if (!handledEarlyAdaptationAbort())
- abortTransaction("adaptation failure with a filled entry");
+ abortAll("adaptation failure with a filled entry");
}
/// If the store entry is still empty, fully handles adaptation abort, returning
err->detailError(ERR_DETAIL_ICAP_RESPMOD_EARLY);
fwd->fail(err);
fwd->dontRetry(true);
- abortTransaction("adaptation failure with an empty entry");
+ abortAll("adaptation failure with an empty entry");
return true; // handled
}
if (!entry->isEmpty()) { // too late to block (should not really happen)
if (request)
request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_RESPMOD_BLOCK_LATE);
- abortTransaction("late adaptation block");
+ abortAll("late adaptation block");
return;
}
fwd->fail(err);
fwd->dontRetry(true);
- abortTransaction("timely adaptation block");
+ abortOnData("timely adaptation block");
}
void
ErrorState *err = new ErrorState(ERR_TOO_BIG, Http::scForbidden, request);
fwd->fail(err);
fwd->dontRetry(true);
- abortTransaction("Virgin body too large.");
+ abortOnData("Virgin body too large.");
}
// TODO: when HttpStateData sends all errors to ICAP,