]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/RequestMimeType.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / acl / RequestMimeType.h
1 /*
2 * Copyright (C) 1996-2018 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_ACLREQUESTMIMETYPE_H
10 #define SQUID_ACLREQUESTMIMETYPE_H
11
12 #include "acl/Data.h"
13 #include "acl/FilledChecklist.h"
14 #include "acl/RequestHeaderStrategy.h"
15
16 /* partial specialisation */
17
18 template <>
19 inline int
20 ACLRequestHeaderStrategy<Http::HdrType::CONTENT_TYPE>::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist)
21 {
22 char const *theHeader = checklist->request->header.getStr(Http::HdrType::CONTENT_TYPE);
23
24 if (NULL == theHeader)
25 theHeader = "";
26
27 return data->match(theHeader);
28 }
29
30 #endif /* SQUID_ACLREQUESTMIMETYPE_H */
31