]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merged from trunk
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 8 Dec 2010 12:45:50 +0000 (01:45 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 8 Dec 2010 12:45:50 +0000 (01:45 +1300)
17 files changed:
1  2 
doc/release-notes/release-3.2.sgml
src/Store.h
src/cache_cf.cc
src/cf.data.pre
src/client_side.cc
src/client_side_reply.cc
src/client_side_request.cc
src/comm.cc
src/external_acl.cc
src/forward.cc
src/http.cc
src/protos.h
src/redirect.cc
src/snmp_core.cc
src/stat.cc
src/structs.h
src/tests/stub_cache_manager.cc

Simple merge
diff --cc src/Store.h
Simple merge
diff --cc src/cache_cf.cc
Simple merge
diff --cc src/cf.data.pre
Simple merge
Simple merge
Simple merge
index 9c7629276de406cafaee73f45253c1d525d8273d,76e3d3aadc463a44d38395b3d08f5fe8cb626624..40238bc59059990bbdc76680b83da810cb8ec48b
@@@ -1514,7 -1515,16 +1517,16 @@@ ClientHttpRequest::noteBodyProducerAbor
  {
      assert(!virginHeadSource);
      stopConsumingFrom(adaptedBodySource);
-     handleAdaptationFailure(ERR_DETAIL_ICAP_RESPMOD_CLT_SIDE_BODY);
+     debugs(85,3, HERE << "REQMOD body production failed");
+     if (request_satisfaction_mode) { // too late to recover or serve an error
+         request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_CLT_REQMOD_RESP_BODY);
 -        const int fd = getConn()->fd;
 -        Must(fd >= 0);
 -        comm_close(fd); // drastic, but we may be writing a response already
++        const Comm::ConnectionPointer c = getConn()->clientConn;
++        Must(Comm::IsConnOpen(c));
++        c->close(); // drastic, but we may be writing a response already
+     } else {
+         handleAdaptationFailure(ERR_DETAIL_CLT_REQMOD_REQ_BODY);
+     }
  }
  
  void
diff --cc src/comm.cc
Simple merge
Simple merge
diff --cc src/forward.cc
index 7ed9de2d5e3513a7f7309b1de81c43ee2d4fbf5c,906918105a02d553f7ffe1b70388d4a122a03157..ead2e1fc0ec5d3182bb921a0aeb9c9369db85c32
  #include "ip/Intercept.h"
  #include "ip/tools.h"
  #include "mgr/Registration.h"
+ #if USE_SSL
+ #include "ssl/support.h"
+ #endif
  
 -static PSC fwdStartCompleteWrapper;
 +static PSC fwdPeerSelectionCompleteWrapper;
  static PF fwdServerClosedWrapper;
  #if USE_SSL
  static PF fwdNegotiateSSLWrapper;
diff --cc src/http.cc
index dee62d3b9114cce4a3f8d0b1d35f1a4c4aab2d1b,7bb69d10e71cca9ba89fd950d9d9688089448ea8..3bcb96e073e48cc99d97c5d795d61523fe327692
@@@ -1010,19 -1008,17 +1010,17 @@@ HttpStateData::statusIfComplete() cons
  HttpStateData::ConnectionStatus
  HttpStateData::persistentConnStatus() const
  {
 -    debugs(11, 3, "persistentConnStatus: FD " << fd << " eof=" << eof);
 +    debugs(11, 3, HERE << serverConnection << " eof=" << eof);
-     const HttpReply *vrep = virginReply();
-     debugs(11, 5, "persistentConnStatus: content_length=" << vrep->content_length);
-     /* If we haven't seen the end of reply headers, we are not done */
-     debugs(11, 5, "persistentConnStatus: flags.headers_parsed=" << flags.headers_parsed);
-     if (!flags.headers_parsed)
-         return INCOMPLETE_MSG;
      if (eof) // already reached EOF
          return COMPLETE_NONPERSISTENT_MSG;
  
 -    if (!canSend(fd))
+     /* If server fd is closing (but we have not been notified yet), stop Comm
+        I/O to avoid assertions. TODO: Change Comm API to handle callers that
+        want more I/O after async closing (usually initiated by others). */
+     // XXX: add canReceive or s/canSend/canTalkToServer/
++    if (!Comm::IsConnOpen(serverConnection))
+         return COMPLETE_NONPERSISTENT_MSG;
      /** \par
       * In chunked response we do not know the content length but we are absolutely
       * sure about the end of response, so we are calling the statusIfComplete to
diff --cc src/protos.h
Simple merge
diff --cc src/redirect.cc
Simple merge
Simple merge
diff --cc src/stat.cc
index 3ebad838c2cf8daa327b60616ffff046e9cbc1ba,a020ccf4e96dd1e3d82c0fd7ce7a462455162817..bf178566d9fc2e40f37b90bb7dd1e90b4acf1835
  #include "mgr/InfoAction.h"
  #include "mgr/IntervalAction.h"
  #include "mgr/IoAction.h"
 +#include "mgr/Registration.h"
  #include "mgr/ServiceTimesAction.h"
+ #if USE_SSL
+ #include "ssl/support.h"
+ #endif
  
  /* these are included because they expose stats calls */
  /* TODO: provide a self registration mechanism for those classes
diff --cc src/structs.h
Simple merge
Simple merge