]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ClientRequestContext.h
Prep for 3.3.12 and 3.4.4
[thirdparty/squid.git] / src / ClientRequestContext.h
CommitLineData
e1f7507e
AJ
1#ifndef SQUID_CLIENTREQUESTCONTEXT_H
2#define SQUID_CLIENTREQUESTCONTEXT_H
3
8bf217bd 4#include "base/RefCount.h"
e1f7507e 5#include "cbdata.h"
582c2af2 6#include "ipcache.h"
e1f7507e 7
a83c6ed6
AR
8#if USE_ADAPTATION
9#include "adaptation/forward.h"
0f305536 10#endif
11
582c2af2
FC
12class ACLChecklist;
13class ClientHttpRequest;
14class DnsLookupDetails;
15class ErrorState;
16
e166785a
AJ
17class HelperReply;
18
0f305536 19class ClientRequestContext : public RefCountable
20{
21
22public:
0f305536 23 ClientRequestContext(ClientHttpRequest *);
24 ~ClientRequestContext();
25
26 bool httpStateIsValid();
fe97983f
AJ
27 void hostHeaderVerify();
28 void hostHeaderIpVerify(const ipcache_addrs* ia, const DnsLookupDetails &dns);
05b28f84 29 void hostHeaderVerifyFailed(const char *A, const char *B);
0f305536 30 void clientAccessCheck();
533493da 31 void clientAccessCheck2();
2efeb0b7 32 void clientAccessCheckDone(const allow_t &answer);
0f305536 33 void clientRedirectStart();
e166785a 34 void clientRedirectDone(const HelperReply &reply);
a8a0b1c2
EC
35 void clientStoreIdStart();
36 void clientStoreIdDone(const HelperReply &reply);
0f305536 37 void checkNoCache();
2efeb0b7 38 void checkNoCacheDone(const allow_t &answer);
a83c6ed6 39#if USE_ADAPTATION
0f305536 40
a83c6ed6 41 void adaptationAccessCheck();
0f305536 42#endif
e0c0d54c
CT
43#if USE_SSL
44 /**
45 * Initiates and start the acl checklist to check if the a CONNECT
46 * request must be bumped.
47 \retval true if the acl check scheduled, false if no ssl-bump required
48 */
49 bool sslBumpAccessCheck();
50 /// The callback function for ssl-bump access check list
ed6163ef 51 void sslBumpAccessCheckDone(const allow_t &answer);
e0c0d54c 52#endif
0f305536 53
54 ClientHttpRequest *http;
55 ACLChecklist *acl_checklist; /* need ptr back so we can unreg if needed */
56 int redirect_state;
a8a0b1c2 57 int store_id_state;
0f305536 58
d06e17ea
AJ
59 /**
60 * URL-rewrite/redirect helper may return BH for internal errors.
61 * We attempt to recover by trying the lookup again, but limit the
62 * number of retries to prevent lag and lockups.
63 * This tracks the number of previous failures for the current context.
64 */
65 uint8_t redirect_fail_count;
a8a0b1c2 66 uint8_t store_id_fail_count;
d06e17ea 67
fe97983f 68 bool host_header_verify_done;
57abaac0 69 bool http_access_done;
533493da 70 bool adapted_http_access_done;
a83c6ed6 71#if USE_ADAPTATION
a83c6ed6 72 bool adaptation_acl_check_done;
0f305536 73#endif
57abaac0 74 bool redirect_done;
a8a0b1c2 75 bool store_id_done;
5d2136fa 76 bool no_cache_done;
57abaac0 77 bool interpreted_req_hdrs;
425de4c8
AJ
78 bool tosToClientDone;
79 bool nfmarkToClientDone;
e0c0d54c
CT
80#if USE_SSL
81 bool sslBumpCheckDone;
82#endif
7a957a93
AR
83 ErrorState *error; ///< saved error page for centralized/delayed processing
84 bool readNextRequest; ///< whether Squid should read after error handling
0f305536 85
9d5e7196 86private:
f49c09b2 87 CBDATA_CLASS2(ClientRequestContext);
0f305536 88};
89
e1f7507e 90#endif /* SQUID_CLIENTREQUESTCONTEXT_H */