]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #998: acl rep_mime_type broken, looking into request headers
authorhno <>
Thu, 21 Oct 2004 04:37:56 +0000 (04:37 +0000)
committerhno <>
Thu, 21 Oct 2004 04:37:56 +0000 (04:37 +0000)
where it should look into reply headers.

By  Gonzalo Arana

src/ACLReplyHeaderStrategy.h
src/ACLReplyMIMEType.h

index 927524438806220882b1ece58f8d1261cd8e1df4..9c6d6adebf94949a4a531c643067e9ed986c0a0a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLReplyHeaderStrategy.h,v 1.4 2003/08/10 09:53:49 robertc Exp $
+ * $Id: ACLReplyHeaderStrategy.h,v 1.5 2004/10/20 22:37:56 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -65,7 +65,7 @@ template <http_hdr_type header>
 int
 ACLReplyHeaderStrategy<header>::match (ACLData<char const *> * &data, ACLChecklist *checklist)
 {
-    char const *theHeader = httpHeaderGetStr(&checklist->request->header, header);
+    char const *theHeader = httpHeaderGetStr(&checklist->reply->header, header);
 
     if (NULL == theHeader)
         return 0;
index 0e03f41d3c0af641bd1a0c9826350e0f0e962b15..9fd6a9561b2deb825ce16e50c57122042fe2bc14 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLReplyMIMEType.h,v 1.3 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ACLReplyMIMEType.h,v 1.4 2004/10/20 22:37:56 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -40,8 +40,7 @@
 #include "ACLReplyHeaderStrategy.h"
 #include "ACLStrategised.h"
 #include "ACLChecklist.h"
-/* FIXME: TODO: this is broken - should be HttpReply checks!! */
-#include "HttpRequest.h"
+#include "HttpReply.h"
 
 class ACLReplyMIMEType
 {
@@ -55,7 +54,7 @@ private:
 int
 ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>::match (ACLData<char const *> * &data, ACLChecklist *checklist)
 {
-    char const *theHeader = httpHeaderGetStr(&checklist->request->header, HDR_CONTENT_TYPE);
+    char const *theHeader = httpHeaderGetStr(&checklist->reply->header, HDR_CONTENT_TYPE);
 
     if (NULL == theHeader)
         theHeader = "";