ClientRequestContext.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
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 
9 #ifndef SQUID_SRC_CLIENTREQUESTCONTEXT_H
10 #define SQUID_SRC_CLIENTREQUESTCONTEXT_H
11 
12 #include "acl/forward.h"
13 #include "base/RefCount.h"
14 #include "cbdata.h"
15 #include "defines.h"
16 #include "dns/forward.h"
17 #include "helper/forward.h"
18 #include "ipcache.h"
19 
20 #if USE_ADAPTATION
21 #include "adaptation/forward.h"
22 #endif
23 
24 class ACLChecklist;
25 class ClientHttpRequest;
26 class ErrorState;
27 
29 {
31 
32 public:
34  ~ClientRequestContext() override;
35 
36  void hostHeaderVerify();
38  void hostHeaderVerifyFailed(const char *A, const char *B);
39  void clientAccessCheck();
40  void clientAccessCheck2();
41  void clientAccessCheckDone(const Acl::Answer &);
42  void clientRedirectStart();
43  void clientRedirectDone(const Helper::Reply &);
44  void clientStoreIdStart();
45  void clientStoreIdDone(const Helper::Reply &);
46  void checkNoCache();
47  void checkNoCacheDone(const Acl::Answer &);
48 #if USE_ADAPTATION
49  void adaptationAccessCheck();
50 #endif
51 #if USE_OPENSSL
52 
58  bool sslBumpAccessCheck();
60  void sslBumpAccessCheckDone(const Acl::Answer &answer);
61 #endif
62 
66 
68  bool http_access_done = false;
70 #if USE_ADAPTATION
72 #endif
73  bool redirect_done = false;
74  bool store_id_done = false;
75  bool no_cache_done = false;
76  bool interpreted_req_hdrs = false;
77  bool toClientMarkingDone = false;
78 #if USE_OPENSSL
79  bool sslBumpCheckDone = false;
80 #endif
81 
82  bool readNextRequest = false;
83  ErrorState *error = nullptr;
84 
85 #if FOLLOW_X_FORWARDED_FOR
86  size_t currentXffHopNumber = 0;
87 #endif
88 };
89 
90 #endif /* SQUID_SRC_CLIENTREQUESTCONTEXT_H */
91 
bool readNextRequest
whether Squid should read after error handling
void hostHeaderIpVerify(const ipcache_addrs *, const Dns::LookupDetails &)
#define CBDATA_CLASS(type)
Definition: cbdata.h:289
ErrorState * error
saved error page for centralized/delayed processing
void clientAccessCheckDone(const Acl::Answer &)
ClientRequestContext(ClientHttpRequest *)
ClientHttpRequest * http
void checkNoCache()
applies "cache allow/deny" rules, asynchronously if needed
void clientRedirectDone(const Helper::Reply &)
void clientStoreIdDone(const Helper::Reply &)
void hostHeaderVerifyFailed(const char *A, const char *B)
encapsulates DNS lookup results
Definition: LookupDetails.h:22
size_t currentXffHopNumber
number of X-Forwarded-For header values processed so far
void sslBumpAccessCheckDone(const Acl::Answer &answer)
The callback function for ssl-bump access check list.
void checkNoCacheDone(const Acl::Answer &)
#define REDIRECT_NONE
Definition: defines.h:53

 

Introduction

Documentation

Support

Miscellaneous