/* * Copyright (C) 1996-2024 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for details. */ #ifndef SQUID_SRC_ACL_REPLYHEADERSTRATEGY_H #define SQUID_SRC_ACL_REPLYHEADERSTRATEGY_H #include "acl/Acl.h" #include "acl/Data.h" #include "acl/FilledChecklist.h" #include "acl/Strategy.h" #include "HttpReply.h" template class ACLReplyHeaderStrategy : public ACLStrategy { public: int match (ACLData * &, ACLFilledChecklist *) override; bool requiresReply() const override {return true;} }; template int ACLReplyHeaderStrategy
::match (ACLData * &data, ACLFilledChecklist *checklist) { char const *theHeader = checklist->reply->header.getStr(header); if (nullptr == theHeader) return 0; return data->match(theHeader); } #endif /* SQUID_SRC_ACL_REPLYHEADERSTRATEGY_H */