]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/Note.cc
2 * Copyright (C) 1996-2023 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("-m");
22 static const Acl::Options MyOptions
= { &Delimiters
};
23 Delimiters
.linkWith(&delimiters
);
30 ACLNoteStrategy::match(ACLData
<MatchType
> * &data
, ACLFilledChecklist
*checklist
)
32 if (const auto request
= checklist
->request
) {
33 if (request
->hasNotes() && matchNotes(data
, request
->notes().getRaw()))
36 const Adaptation::History::Pointer ah
= request
->adaptLogHistory();
37 if (ah
!= nullptr && ah
->metaHeaders
!= nullptr && matchNotes(data
, ah
->metaHeaders
.getRaw()))
45 ACLNoteStrategy::matchNotes(ACLData
<MatchType
> *noteData
, const NotePairs
*note
) const
47 const NotePairs::Entries
&entries
= note
->expandListEntries(&delimiters
.value
);
49 if (noteData
->match(e
.getRaw()))