2 * Copyright (C) 1996-2019 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/FilledChecklist.h"
11 #include "acl/HttpHeaderData.h"
13 #include "acl/NoteData.h"
14 #include "HttpRequest.h"
16 /* Acl::AnnotationStrategy */
19 Acl::AnnotationStrategy::options()
21 static const Acl::CharacterSetOption Delimiters
;
22 static const Acl::Options MyOptions
= {
25 Delimiters
.linkWith(&delimiters
);
32 ACLNoteStrategy::match(ACLData
<MatchType
> * &data
, ACLFilledChecklist
*checklist
)
34 if (const auto request
= checklist
->request
) {
35 if (request
->hasNotes() && matchNotes(data
, request
->notes().getRaw()))
38 const Adaptation::History::Pointer ah
= request
->adaptLogHistory();
39 if (ah
!= NULL
&& ah
->metaHeaders
!= NULL
&& matchNotes(data
, ah
->metaHeaders
.getRaw()))
47 ACLNoteStrategy::matchNotes(ACLData
<MatchType
> *noteData
, const NotePairs
*note
) const
49 const NotePairs::Entries
&entries
= note
->expandListEntries(&delimiters
.value
);
51 if (noteData
->match(e
.getRaw()))