2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_CLIENTREQUESTCONTEXT_H
10 #define SQUID_CLIENTREQUESTCONTEXT_H
12 #include "base/RefCount.h"
14 #include "helper/forward.h"
18 #include "adaptation/forward.h"
22 class ClientHttpRequest
;
23 class DnsLookupDetails
;
26 class ClientRequestContext
: public RefCountable
28 CBDATA_CLASS(ClientRequestContext
);
31 ClientRequestContext(ClientHttpRequest
*);
32 ~ClientRequestContext();
34 bool httpStateIsValid();
35 void hostHeaderVerify();
36 void hostHeaderIpVerify(const ipcache_addrs
* ia
, const DnsLookupDetails
&dns
);
37 void hostHeaderVerifyFailed(const char *A
, const char *B
);
38 void clientAccessCheck();
39 void clientAccessCheck2();
40 void clientAccessCheckDone(const allow_t
&answer
);
41 void clientRedirectStart();
42 void clientRedirectDone(const Helper::Reply
&reply
);
43 void clientStoreIdStart();
44 void clientStoreIdDone(const Helper::Reply
&reply
);
46 void checkNoCacheDone(const allow_t
&answer
);
49 void adaptationAccessCheck();
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
57 bool sslBumpAccessCheck();
58 /// The callback function for ssl-bump access check list
59 void sslBumpAccessCheckDone(const allow_t
&answer
);
62 ClientHttpRequest
*http
;
63 ACLChecklist
*acl_checklist
; /* need ptr back so we can unreg if needed */
67 bool host_header_verify_done
;
68 bool http_access_done
;
69 bool adapted_http_access_done
;
71 bool adaptation_acl_check_done
;
76 bool interpreted_req_hdrs
;
78 bool nfmarkToClientDone
;
80 bool sslBumpCheckDone
;
82 ErrorState
*error
; ///< saved error page for centralized/delayed processing
83 bool readNextRequest
; ///< whether Squid should read after error handling
86 #endif /* SQUID_CLIENTREQUESTCONTEXT_H */