]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/MethodData.cc
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 28 Access Control */
12 #include "acl/Checklist.h"
13 #include "acl/MethodData.h"
15 #include "http/RequestMethod.h"
17 int ACLMethodData::ThePurgeCount
= 0;
19 ACLMethodData::ACLMethodData(ACLMethodData
const &old
)
21 assert(old
.values
.empty());
24 ACLMethodData::~ACLMethodData()
30 ACLMethodData::match(HttpRequestMethod toFind
)
32 for (std::list
<HttpRequestMethod
>::const_iterator i
= values
.begin(); i
!= values
.end(); ++i
) {
34 // tune the list for LRU ordering
36 values
.push_front(toFind
);
44 ACLMethodData::dump() const
47 for (std::list
<HttpRequestMethod
>::const_iterator i
= values
.begin(); i
!= values
.end(); ++i
) {
48 sl
.push_back((*i
).image());
55 ACLMethodData::parse()
57 while (char *t
= strtokFile()) {
59 m
.HttpRequestMethodXXX(t
);
61 if (values
.back() == Http::METHOD_PURGE
)
62 ++ThePurgeCount
; // configuration code wants to know
66 ACLData
<HttpRequestMethod
> *
67 ACLMethodData::clone() const
69 assert(values
.empty());
70 return new ACLMethodData(*this);