]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
The last http.cc commit message is missing the following important change:
authorrousskov <>
Wed, 20 Jun 2007 03:19:04 +0000 (03:19 +0000)
committerrousskov <>
Wed, 20 Jun 2007 03:19:04 +0000 (03:19 +0000)
HttpStateData may get stuck if request body producer aborts while the
request body is being sent. The code already had a related XXX comment.
This change is meant to abort the server transaction when that happens,
but I cannot reproduce the problem and, hence, is not sure the change is
correct and sufficient.

When handling request body producer abort, create an error before
terminating the server transaction because FwdState asserts there is an
error. Unfortunately, we do not know why the body was aborted and have
to guess. The response is probably irrelevant if it was the HTTP client
that aborted the request. Thus, we are using ICAP_ERROR in hope that all
other cases are ICAP-related. If there are exceptions, we may confuse
admins and developers.

Merged from the squid3-icap branch.

src/http.cc

index c5f50d6cda58a23b426d23b34ef67fdfd5edfb34..899234a11ea7824fe24c315de11d8bae6e7a2a22 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.525 2007/06/19 20:27:00 rousskov Exp $
+ * $Id: http.cc,v 1.526 2007/06/19 21:19:04 rousskov Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -1938,7 +1938,7 @@ HttpStateData::abortTransaction(const char *reason)
     if (fd >= 0) {
         comm_close(fd);
         return;
-       }
+    }
 
     fwd->handleUnregisteredServerEnd();
     delete this;