]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/MyPortName.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / acl / MyPortName.cc
CommitLineData
81b6e9a7 1/*
f70aedc4 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
81b6e9a7 3 *
bbc27441
AJ
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.
81b6e9a7 7 */
8
582c2af2 9#include "squid.h"
4eac3407 10#include "acl/FilledChecklist.h"
127dce76
AR
11#include "acl/MyPortName.h"
12#include "acl/StringData.h"
65d448bc 13#include "anyp/PortCfg.h"
b50e327b 14#include "client_side.h"
d3dddfb5 15#include "http/Stream.h"
8d664cb0 16#include "HttpRequest.h"
b50e327b 17
81b6e9a7 18int
4eac3407 19ACLMyPortNameStrategy::match(ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
81b6e9a7 20{
1d5613fb 21 if (checklist->conn() != NULL && checklist->conn()->port != NULL)
35fb56c9
AJ
22 return data->match(checklist->conn()->port->name);
23 if (checklist->request != NULL)
24 return data->match(checklist->request->myportname.termedBuf());
81b6e9a7 25 return 0;
26}
27