This patch is generated from the squid3-icap branch of HEAD in squid3 Fri Oct 12 00:18:33 2007 GMT See http://devel.squid-cache.org/ Index: squid3/src/http.cc diff -u squid3/src/http.cc:1.122 squid3/src/http.cc:1.49.2.83 --- squid3/src/http.cc:1.122 Thu Sep 27 07:51:36 2007 +++ squid3/src/http.cc Thu Oct 11 08:03:35 2007 @@ -1835,8 +1835,19 @@ HttpStateData::handleRequestBodyProducerAborted() { ServerStateData::handleRequestBodyProducerAborted(); - // XXX: SendComplete(COMM_ERR_CLOSING) does little. Is it enough? SendComplete(fd, NULL, 0, COMM_ERR_CLOSING, 0, this); + if (entry->isEmpty()) { + debugs(11,9, HERE << "creating error entry for producer abort"); + // XXX: This may not be an ICAP error. The error is probably + // irrelevant if it was the HTTP client that aborted the request. + // We use ERR_ICAP in hope that all other cases are ICAP-related. + // FwdState asserts there is an error. + ErrorState *err = + errorCon(ERR_ICAP_FAILURE, HTTP_INTERNAL_SERVER_ERROR, orig_request); + fwd->fail(err); + } + + abortTransaction("premature end of request body while sending"); } // called when we wrote request headers(!) or a part of the body