]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/Note.cc
2 * Copyright (C) 1996-2017 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.
10 #include "acl/Checklist.h"
11 #include "acl/HttpHeaderData.h"
13 #include "acl/NoteData.h"
14 #include "HttpRequest.h"
16 #include "parser/Tokenizer.h"
17 #include "sbuf/StringConvert.h"
20 ACLNoteStrategy::match(ACLData
<MatchType
> * &data
, ACLFilledChecklist
*checklist
, ACLFlags
&flags
)
22 if (const auto request
= checklist
->request
) {
23 if (request
->hasNotes() && matchNotes(data
, request
->notes().getRaw(), flags
.delimiters()))
26 const Adaptation::History::Pointer ah
= request
->adaptLogHistory();
27 if (ah
!= NULL
&& ah
->metaHeaders
!= NULL
&& matchNotes(data
, ah
->metaHeaders
.getRaw(), flags
.delimiters()))
35 ACLNoteStrategy::matchNotes(ACLData
<MatchType
> *noteData
, const NotePairs
*note
, const CharacterSet
*delimiters
) const
37 const NotePairs::Entries
&entries
= note
->expandListEntries(delimiters
);
39 if (noteData
->match(e
.getRaw()))
45 ACLNoteStrategy::Instance()
50 ACLNoteStrategy
ACLNoteStrategy::Instance_
;