]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/ReplyMimeType.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / ReplyMimeType.h
CommitLineData
5dee515e 1/*
bde978a6 2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
5dee515e 3 *
bbc27441
AJ
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.
5dee515e 7 */
bbc27441 8
b0dd28ba 9#ifndef SQUID_ACLREPLYMIMETYPE_H
10#define SQUID_ACLREPLYMIMETYPE_H
e1f7507e 11
127dce76
AR
12#include "acl/Acl.h"
13#include "acl/Strategised.h"
5dee515e 14
b0dd28ba 15class ACLReplyMIMEType
16{
62e76326 17
b0dd28ba 18private:
19 static ACL::Prototype RegistryProtoype;
20 static ACLStrategised<char const *> RegistryEntry_;
21};
62e76326 22
b0dd28ba 23/* partial specialisation */
f75662c9 24
602d9612 25#include "acl/Checklist.h"
127dce76
AR
26#include "acl/Data.h"
27#include "acl/ReplyHeaderStrategy.h"
e1f7507e 28
f75662c9 29template <>
e1f7507e 30inline int
33810b1d 31ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>::match(ACLData<char const *> * &data, ACLFilledChecklist *checklist, ACLFlags &)
62e76326 32{
a9925b40 33 char const *theHeader = checklist->reply->header.getStr(HDR_CONTENT_TYPE);
62e76326 34
b0dd28ba 35 if (NULL == theHeader)
36 theHeader = "";
62e76326 37
b0dd28ba 38 return data->match(theHeader);
39}
5dee515e 40
b0dd28ba 41#endif /* SQUID_ACLREPLYMIMETYPE_H */
f53969cc 42