]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/http/StateFlags.h
2 * Copyright (C) 1996-2023 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_SRC_HTTP_STATEFLAGS_H
10 #define SQUID_SRC_HTTP_STATEFLAGS_H
18 unsigned int front_end_https
= 0; ///< send "Front-End-Https: On" header (off/on/auto=2)
20 /// whether the Squid-sent request offers to keep the connection persistent
21 bool keepalive
= false;
23 /// whether Squid should not keep the connection persistent despite offering
24 /// to do so previously (and setting the keepalive flag)
25 bool forceClose
= false;
27 bool only_if_cached
= false;
29 /// Whether we are processing an HTTP 1xx control message.
30 bool handling1xx
= false;
32 /// Whether we received an HTTP 101 (Switching Protocols) control message.
33 /// Implies true handling1xx, but the serverSwitchedProtocols state is
34 /// permanent/final while handling of other control messages usually stops.
35 bool serverSwitchedProtocols
= false;
37 bool headers_parsed
= false;
39 /// Whether the next TCP hop is a cache_peer, including originserver
42 /// Whether this request is being forwarded inside a CONNECT tunnel
43 /// through a [non-originserver] cache_peer; implies peering and toOrigin
44 bool tunneling
= false;
46 /// Whether the next HTTP hop is an origin server, including an
47 /// originserver cache_peer. The three possible cases are:
48 /// -# a direct TCP/HTTP connection to an origin server,
49 /// -# a direct TCP/HTTP connection to an originserver cache_peer, and
50 /// -# a CONNECT tunnel through a [non-originserver] cache_peer [to an origin server]
51 /// Thus, toOrigin is false only when the HTTP request is sent over
52 /// a direct TCP/HTTP connection to a non-originserver cache_peer.
53 bool toOrigin
= false;
55 /// Whether the next TCP/HTTP hop is an originserver cache_peer.
56 bool toOriginPeer() const { return toOrigin
&& peering
&& !tunneling
; }
58 bool keepalive_broken
= false;
59 bool abuse_detected
= false;
60 bool request_sent
= false;
61 bool chunked
= false; ///< reading a chunked response; TODO: rename
62 bool chunked_request
= false; ///< writing a chunked request
63 bool sentLastChunk
= false; ///< do not try to write last-chunk again
68 #endif /* SQUID_SRC_HTTP_STATEFLAGS_H */