]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #833: deny_info only works with http_access, not http_reply_access or miss_access
authorhno <>
Fri, 15 Oct 2004 05:32:45 +0000 (05:32 +0000)
committerhno <>
Fri, 15 Oct 2004 05:32:45 +0000 (05:32 +0000)
src/client_side_reply.cc
src/forward.cc

index d8127063a2eff5cb11c5b1d1f525006dce9c16ea..5c9fe54fcb4458f6b79f2e675352ac4efce93c54 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_reply.cc,v 1.72 2004/09/26 16:38:01 hno Exp $
+ * $Id: client_side_reply.cc,v 1.73 2004/10/14 23:32:45 hno Exp $
  *
  * DEBUG: section 88    Client-side Reply Routines
  * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -1868,14 +1868,25 @@ clientReplyContext::processReplyAccessResult(bool accessAllowed)
          * to tell if this is a squid generated error page, or one from
          *  upstream at this point. */
         ErrorState *err;
+        err_type page_id;
+        page_id = aclGetDenyInfoPage(&Config.denyInfoList, AclMatchedName);
+
+        if (page_id == ERR_NONE)
+            page_id = ERR_ACCESS_DENIED;
+
         err =
-            clientBuildError(ERR_ACCESS_DENIED, HTTP_FORBIDDEN, NULL,
+            clientBuildError(page_id, HTTP_FORBIDDEN, NULL,
                              http->getConn().getRaw() != NULL ? &http->getConn()->peer.sin_addr : &no_addr,
                              http->request);
+
         removeClientStoreReference(&sc, http);
+
         startError(err);
+
         httpReplyDestroy(rep);
+
         http->logType = LOG_TCP_DENIED_REPLY;
+
         return;
     }
 
index 0c50f9269d143b431357a82bfcae59d47310c257..9a6d635a86de68db02b088e9053dc6a625288c77 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.cc,v 1.120 2004/10/10 02:49:05 hno Exp $
+ * $Id: forward.cc,v 1.121 2004/10/14 23:32:45 hno Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -884,10 +884,20 @@ fwdStart(int fd, StoreEntry * e, HttpRequest * r)
         ch.accessList = NULL;
 
         if (answer == 0) {
-            err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN);
+            err_type page_id;
+            page_id = aclGetDenyInfoPage(&Config.denyInfoList, AclMatchedName);
+
+            if (page_id == ERR_NONE)
+                page_id = ERR_FORWARDING_DENIED;
+
+            err = errorCon(page_id, HTTP_FORBIDDEN);
+
             err->request = requestLink(r);
+
             err->src_addr = r->client_addr;
+
             errorAppendEntry(e, err);
+
             return;
         }
     }