ReplyHeaderStrategy.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_ACLREPLYHEADERSTRATEGY_H
10 #define SQUID_ACLREPLYHEADERSTRATEGY_H
11 
12 #include "acl/Acl.h"
13 #include "acl/Data.h"
14 #include "acl/FilledChecklist.h"
15 #include "acl/Strategy.h"
16 #include "HttpReply.h"
17 
18 template <Http::HdrType header>
19 class ACLReplyHeaderStrategy : public ACLStrategy<char const *>
20 {
21 
22 public:
23  virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
24  virtual bool requiresReply() const {return true;}
25 };
26 
27 template <Http::HdrType header>
28 int
30 {
31  char const *theHeader = checklist->reply->header.getStr(header);
32 
33  if (NULL == theHeader)
34  return 0;
35 
36  return data->match(theHeader);
37 }
38 
39 #endif /* SQUID_REPLYHEADERSTRATEGY_H */
40 
virtual bool match(M)=0
virtual int match(ACLData< char const * > *&, ACLFilledChecklist *)
virtual bool requiresReply() const
void const char HLPCB void * data
Definition: stub_helper.cc:16
HttpHeader header
Definition: Message.h:74
A matching algorithm.
Definition: Strategy.h:21
const char * getStr(Http::HdrType id) const
Definition: HttpHeader.cc:1203
#define NULL
Definition: types.h:166

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors