]>
Commit | Line | Data |
---|---|---|
5dee515e | 1 | /* |
bf95c10a | 2 | * Copyright (C) 1996-2022 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 | |
5dee515e | 9 | #ifndef SQUID_ACLREQUESTMIMETYPE_H |
10 | #define SQUID_ACLREQUESTMIMETYPE_H | |
e1f7507e | 11 | |
127dce76 | 12 | #include "acl/Data.h" |
aa28452d | 13 | #include "acl/FilledChecklist.h" |
127dce76 | 14 | #include "acl/RequestHeaderStrategy.h" |
e1f7507e | 15 | |
4eac3407 CT |
16 | /* partial specialisation */ |
17 | ||
f75662c9 | 18 | template <> |
e1f7507e | 19 | inline int |
4eac3407 | 20 | ACLRequestHeaderStrategy<Http::HdrType::CONTENT_TYPE>::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist) |
5dee515e | 21 | { |
789217a2 | 22 | char const *theHeader = checklist->request->header.getStr(Http::HdrType::CONTENT_TYPE); |
62e76326 | 23 | |
aee3523a | 24 | if (nullptr == theHeader) |
62e76326 | 25 | theHeader = ""; |
26 | ||
5dee515e | 27 | return data->match(theHeader); |
28 | } | |
29 | ||
30 | #endif /* SQUID_ACLREQUESTMIMETYPE_H */ | |
f53969cc | 31 |