]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ClientRequestContext.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / ClientRequestContext.h
CommitLineData
bbc27441 1/*
4ac4a490 2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
bbc27441
AJ
3 *
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.
7 */
8
e1f7507e
AJ
9#ifndef SQUID_CLIENTREQUESTCONTEXT_H
10#define SQUID_CLIENTREQUESTCONTEXT_H
11
8bf217bd 12#include "base/RefCount.h"
e1f7507e 13#include "cbdata.h"
4a3b98d7 14#include "dns/forward.h"
24438ec5 15#include "helper/forward.h"
582c2af2 16#include "ipcache.h"
e1f7507e 17
a83c6ed6
AR
18#if USE_ADAPTATION
19#include "adaptation/forward.h"
0f305536 20#endif
21
582c2af2
FC
22class ACLChecklist;
23class ClientHttpRequest;
582c2af2
FC
24class ErrorState;
25
0f305536 26class ClientRequestContext : public RefCountable
27{
5c2f68b7 28 CBDATA_CLASS(ClientRequestContext);
0f305536 29
30public:
0f305536 31 ClientRequestContext(ClientHttpRequest *);
32 ~ClientRequestContext();
33
34 bool httpStateIsValid();
fe97983f 35 void hostHeaderVerify();
4a3b98d7 36 void hostHeaderIpVerify(const ipcache_addrs* ia, const Dns::LookupDetails &dns);
05b28f84 37 void hostHeaderVerifyFailed(const char *A, const char *B);
0f305536 38 void clientAccessCheck();
533493da 39 void clientAccessCheck2();
2efeb0b7 40 void clientAccessCheckDone(const allow_t &answer);
0f305536 41 void clientRedirectStart();
24438ec5 42 void clientRedirectDone(const Helper::Reply &reply);
a8a0b1c2 43 void clientStoreIdStart();
24438ec5 44 void clientStoreIdDone(const Helper::Reply &reply);
0f305536 45 void checkNoCache();
2efeb0b7 46 void checkNoCacheDone(const allow_t &answer);
a83c6ed6 47#if USE_ADAPTATION
0f305536 48
a83c6ed6 49 void adaptationAccessCheck();
0f305536 50#endif
cb4f4424 51#if USE_OPENSSL
e0c0d54c
CT
52 /**
53 * Initiates and start the acl checklist to check if the a CONNECT
54 * request must be bumped.
55 \retval true if the acl check scheduled, false if no ssl-bump required
56 */
57 bool sslBumpAccessCheck();
58 /// The callback function for ssl-bump access check list
ed6163ef 59 void sslBumpAccessCheckDone(const allow_t &answer);
e0c0d54c 60#endif
0f305536 61
62 ClientHttpRequest *http;
63 ACLChecklist *acl_checklist; /* need ptr back so we can unreg if needed */
64 int redirect_state;
a8a0b1c2 65 int store_id_state;
0f305536 66
fe97983f 67 bool host_header_verify_done;
57abaac0 68 bool http_access_done;
533493da 69 bool adapted_http_access_done;
a83c6ed6 70#if USE_ADAPTATION
a83c6ed6 71 bool adaptation_acl_check_done;
0f305536 72#endif
57abaac0 73 bool redirect_done;
a8a0b1c2 74 bool store_id_done;
5d2136fa 75 bool no_cache_done;
57abaac0 76 bool interpreted_req_hdrs;
425de4c8
AJ
77 bool tosToClientDone;
78 bool nfmarkToClientDone;
cb4f4424 79#if USE_OPENSSL
e0c0d54c
CT
80 bool sslBumpCheckDone;
81#endif
7a957a93
AR
82 ErrorState *error; ///< saved error page for centralized/delayed processing
83 bool readNextRequest; ///< whether Squid should read after error handling
0f305536 84};
85
e1f7507e 86#endif /* SQUID_CLIENTREQUESTCONTEXT_H */
f53969cc 87