]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Forgot to check the value of 'icap_enable' (TheICAPConfig.onoff)
authorwessels <>
Sun, 4 Dec 2005 01:00:28 +0000 (01:00 +0000)
committerwessels <>
Sun, 4 Dec 2005 01:00:28 +0000 (01:00 +0000)
when ICAP code was compiled in, but should not be called.

src/client_side_request.cc
src/http.cc

index d70f38e21b44f0cdbf607609295daf260504ae03..4ef3d7824729668831689b6b3652227e9d52fe56 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_request.cc,v 1.52 2005/11/21 23:53:37 wessels Exp $
+ * $Id: client_side_request.cc,v 1.53 2005/12/03 18:00:28 wessels Exp $
  * 
  * DEBUG: section 85    Client-side Request Routines
  * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -60,6 +60,7 @@
 #include "ICAP/ICAPElements.h"
 #include "ICAP/ICAPConfig.h"
 static void icapAclCheckDoneWrapper(ICAPServiceRep::Pointer service, void *data);
+extern ICAPConfig TheICAPConfig;
 #endif
 
 #if LINGERING_CLOSE
@@ -1039,7 +1040,7 @@ ClientHttpRequest::doCallouts()
     }
 
 #if ICAP_CLIENT
-    if (!calloutContext->icap_acl_check_done) {
+    if (TheICAPConfig.onoff && !calloutContext->icap_acl_check_done) {
         calloutContext->icap_acl_check_done = 1;
         calloutContext->icapAccessCheck();
         return;
index 3e072219bd3022d13af56407a441a63a80f56b08..e1ca8e719226f51036739601cd2128f78ac85938 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.468 2005/11/24 00:54:15 wessels Exp $
+ * $Id: http.cc,v 1.469 2005/12/03 18:00:28 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -55,6 +55,7 @@
 #if ICAP_CLIENT
 #include "ICAP/ICAPClientRespmodPrecache.h"
 #include "ICAP/ICAPConfig.h"
+extern ICAPConfig TheICAPConfig;
 #endif
 
 CBDATA_CLASS_INIT(HttpStateData);
@@ -755,7 +756,7 @@ HttpStateData::processReplyHeader()
 
 #if ICAP_CLIENT
 
-    {
+    if (TheICAPConfig.onoff) {
         ICAPAccessCheck *icap_access_check =
             new ICAPAccessCheck(ICAP::methodRespmod, ICAP::pointPreCache, request, reply, icapAclCheckDoneWrapper, this);
 
@@ -764,6 +765,7 @@ HttpStateData::processReplyHeader()
         ctx_exit(ctx);
         return;
     }
+
 #endif
 
     storeEntryReplaceObject(entry, reply);