ReplyHeaderStrategy.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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
18template <Http::HdrType header>
19class ACLReplyHeaderStrategy : public ACLStrategy<char const *>
20{
21
22public:
24 bool requiresReply() const override {return true;}
25};
26
27template <Http::HdrType header>
28int
30{
31 char const *theHeader = checklist->reply->header.getStr(header);
32
33 if (nullptr == theHeader)
34 return 0;
35
36 return data->match(theHeader);
37}
38
39#endif /* SQUID_REPLYHEADERSTRATEGY_H */
40
virtual bool match(M)=0
bool requiresReply() const override
int match(ACLData< char const * > *&, ACLFilledChecklist *) override
A matching algorithm.
Definition: Strategy.h:22
const char * getStr(Http::HdrType id) const
Definition: HttpHeader.cc:1196
HttpHeader header
Definition: Message.h:74

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors