]>
Commit | Line | Data |
---|---|---|
5dee515e | 1 | /* |
4ac4a490 | 2 | * Copyright (C) 1996-2017 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 | 15 | class ACLReplyMIMEType |
16 | { | |
62e76326 | 17 | |
b0dd28ba | 18 | private: |
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 | 29 | template <> |
e1f7507e | 30 | inline int |
789217a2 | 31 | ACLReplyHeaderStrategy<Http::HdrType::CONTENT_TYPE>::match(ACLData<char const *> * &data, ACLFilledChecklist *checklist, ACLFlags &) |
62e76326 | 32 | { |
789217a2 | 33 | char const *theHeader = checklist->reply->header.getStr(Http::HdrType::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 |