-
Notifications
You must be signed in to change notification settings - Fork 638
Expand file tree
/
Copy pathClientRequestContext.h
More file actions
91 lines (78 loc) · 2.63 KB
/
ClientRequestContext.h
File metadata and controls
91 lines (78 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
* Copyright (C) 1996-2026 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Please see the COPYING and CONTRIBUTORS files for details.
*/
#ifndef SQUID_SRC_CLIENTREQUESTCONTEXT_H
#define SQUID_SRC_CLIENTREQUESTCONTEXT_H
#include "acl/forward.h"
#include "base/RefCount.h"
#include "cbdata.h"
#include "defines.h"
#include "dns/forward.h"
#include "helper/forward.h"
#include "ipcache.h"
#if USE_ADAPTATION
#include "adaptation/forward.h"
#endif
class ACLChecklist;
class ClientHttpRequest;
class ErrorState;
class ClientRequestContext : public RefCountable
{
CBDATA_CLASS(ClientRequestContext);
public:
ClientRequestContext(ClientHttpRequest *);
~ClientRequestContext() override;
void hostHeaderVerify();
void hostHeaderIpVerify(const ipcache_addrs *, const Dns::LookupDetails &);
void hostHeaderVerifyFailed(const char *A, const char *B);
void clientAccessCheck();
void clientAccessCheck2();
void clientAccessCheckDone(const Acl::Answer &);
void clientRedirectStart();
void clientRedirectDone(const Helper::Reply &);
void clientStoreIdStart();
void clientStoreIdDone(const Helper::Reply &);
void checkNoCache();
void checkNoCacheDone(const Acl::Answer &);
#if USE_ADAPTATION
void adaptationAccessCheck();
#endif
#if USE_OPENSSL
/**
* Initiates and start the acl checklist to check if the CONNECT
* request must be bumped.
* \retval true if the acl check scheduled
* \retval false if no ssl-bump required
*/
bool sslBumpAccessCheck();
/// The callback function for ssl-bump access check list
void sslBumpAccessCheckDone(const Acl::Answer &answer);
#endif
ClientHttpRequest *http;
int redirect_state = REDIRECT_NONE;
int store_id_state = REDIRECT_NONE;
bool host_header_verify_done = false;
bool http_access_done = false;
bool adapted_http_access_done = false;
#if USE_ADAPTATION
bool adaptation_acl_check_done = false;
#endif
bool redirect_done = false;
bool store_id_done = false;
bool no_cache_done = false;
bool interpreted_req_hdrs = false;
bool toClientMarkingDone = false;
#if USE_OPENSSL
bool sslBumpCheckDone = false;
#endif
bool readNextRequest = false; ///< whether Squid should read after error handling
ErrorState *error = nullptr; ///< saved error page for centralized/delayed processing
#if FOLLOW_X_FORWARDED_FOR
size_t currentXffHopNumber = 0; ///< number of X-Forwarded-For header values processed so far
#endif
};
#endif /* SQUID_SRC_CLIENTREQUESTCONTEXT_H */