1 #ifndef SQUID_REQUESTFLAGS_H_
2 #define SQUID_REQUESTFLAGS_H_
4 * DEBUG: section 73 HTTP Request
5 * AUTHOR: Duane Wessels
7 * SQUID Web Proxy Cache http://www.squid-cache.org/
8 * ----------------------------------------------------------
10 * Squid is the result of efforts by numerous individuals from
11 * the Internet community; see the CONTRIBUTORS file for full
12 * details. Many organizations have provided support for Squid's
13 * development; see the SPONSORS file for full details. Squid is
14 * Copyrighted (C) 2001 by the Regents of the University of
15 * California; see the COPYRIGHT file for full details. Squid
16 * incorporates software developed and/or copyrighted by other
17 * sources; see the CREDITS file for full details.
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
39 memset(this,0,sizeof(RequestFlags
));
42 bool nocache
:1; ///< whether the response to this request may be READ from cache
45 bool cachable
:1; ///< whether the response to thie request may be stored in the cache
48 bool proxy_keepalive
:1;
49 bool proxying
:1; /* this should be killed, also in httpstateflags */
52 bool need_validation
:1;
53 bool fail_on_validation_err
:1; ///< whether we should fail if validation fails
54 bool stale_if_hit
:1; ///< reply is stale if it is a hit
55 #if USE_HTTP_VIOLATIONS
56 /* for changing/ignoring no-cache requests */
57 /* TODO: remove the conditional definition, move ifdef to setter */
62 bool intercepted
:1; ///< intercepted request
63 bool hostVerified
:1; ///< whether the Host: header passed verification
64 bool spoof_client_ip
:1; /**< spoof client ip if possible */
66 bool internalclient
:1;
67 bool must_keepalive
:1;
68 bool connection_auth
:1; /** Request wants connection oriented auth */
69 bool connection_auth_disabled
:1; /** Connection oriented auth can not be supported */
70 bool connection_proxy_auth
:1; /** Request wants connection oriented auth */
71 bool pinned
:1; /* Request sent on a pinned connection */
72 bool canRePin
:1; ///< OK to reopen a failed pinned connection
73 bool auth_sent
:1; /* Authentication forwarded */
74 bool no_direct
:1; /* Deny direct forwarding unless overriden by always_direct. Used in accelerator mode */
75 bool chunked_reply
:1; /**< Reply with chunked transfer encoding */
76 bool stream_error
:1; /**< Whether stream error has occured */
77 bool sslPeek
:1; ///< internal ssl-bump request to get server cert
78 /* done_follow_x_forwarded_for set by default to the opposite of
79 * compilation option FOLLOW_X_FORWARDED_FOR (so that it returns
80 * always "done" if the build option is disabled.
82 bool done_follow_x_forwarded_for
:1;
83 bool sslBumped_
:1; /**< ssl-bumped request*/
84 bool destinationIPLookedUp_
:1;
85 bool resetTCP_
:1; ///< request to reset the TCP stream
88 // When adding new flags, please update cloneAdaptationImmune() as needed.
89 // returns a partial copy of the flags that includes only those flags
90 // that are safe for a related (e.g., ICAP-adapted) request to inherit
91 RequestFlags
cloneAdaptationImmune() const;
93 // if FOLLOW_X_FORWARDED_FOR is not set, we always return "done".
94 bool doneFollowXff() const {
95 return done_follow_x_forwarded_for
|| !FOLLOW_X_FORWARDED_FOR
;
99 #endif /* SQUID_REQUESTFLAGS_H_ */