9#ifndef SQUID_SRC_HTTPREQUEST_H
10#define SQUID_SRC_HTTPREQUEST_H
58 void reset()
override;
151#if FOLLOW_X_FORWARDED_FOR
184#if FOLLOW_X_FORWARDED_FOR
207 void pack(
Packable * p,
bool maskSensitiveInfo =
false)
const;
const Ip::Address * FindListeningPortAddress(const HttpRequest *, const AccessLogEntry *)
void httpRequestPack(void *obj, Packable *p)
void UpdateRequestNotes(ConnStateData *csd, HttpRequest &request, NotePairs const ¬es)
RefCount< AccessLogEntry > AccessLogEntryPointer
AnyP::Port FindListeningPortNumber(const HttpRequest *, const AccessLogEntry *)
NotePairs::Pointer notes()
encapsulates DNS lookup results
void update(const Error &)
if necessary, stores the given error information (if any)
void recordLookup(const Dns::LookupDetails &detail)
bool conditional() const
has at least one recognized If-* header
CbcPointer< ConnStateData > clientConnectionManager
Adaptation::History::Pointer adaptHistory(bool createIfNone=false) const
Returns possibly nil history, creating it if requested.
MasterXaction::Pointer masterXaction
the master transaction this request belongs to. Never nil.
void clearError()
clear error details, useful for retries/repeats
void prepForDirect()
get ready to be sent directly to an origin server, excluding originserver
void prepForPeering(const CachePeer &peer)
get ready to be sent to the given cache_peer, including originserver
void initHTTP(const HttpRequestMethod &aMethod, AnyP::ProtocolType aProtocol, const char *schemeImage, const char *aUrlpath)
int64_t getRangeOffsetLimit()
HttpRequest * clone() const override
bool inheritProperties(const Http::Message *) override
static void httpRequestPack(void *obj, Packable *p)
Ip::Address indirect_client_addr
static HttpRequest * FromUrlXXX(const char *url, const MasterXaction::Pointer &, const HttpRequestMethod &method=Http::METHOD_GET)
bool parseHeader(Http1::Parser &hp)
void packFirstLineInto(Packable *p, bool full_uri) const override
bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) override
bool multipartRangeRequest() const
void pack(Packable *p, bool maskSensitiveInfo=false) const
Adaptation::Icap::History::Pointer icapHistory_
per-HTTP transaction info
void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) override
configures the interpreter as needed
String x_forwarded_for_iterator
bool forcedBodyContinuation
whether we have responded with HTTP 100 or FTP 150 already
bool parseFirstLine(const char *start, const char *end) override
void detailError(const err_type c, const ErrorDetail::Pointer &d)
sets error detail if no earlier detail was available
NotePairs::Pointer notes()
SBuf vary_headers
The variant second-stage cache key. Generated from Vary header pattern for this request.
String etag
A strong etag of the cached entry. Used for refreshing that entry.
Adaptation::History::Pointer adaptHistory_
per-HTTP transaction info
CbcPointer< Downloader > downloader
The Downloader object which initiated the HTTP request if any.
ConnStateData * pinnedConnection()
int dnsWait
sum of DNS lookup delays in milliseconds, for dt
void ignoreRange(const char *reason)
forgets about the cached Range header (for a reason)
NotePairs::Pointer theNotes
void adaptHistoryImport(const HttpRequest &them)
Makes their history ours, throwing on conflicts.
MEMPROXY_CLASS(HttpRequest)
RefCount< HttpRequest > Pointer
void swapOut(StoreEntry *e)
void hdrCacheInit() override
char * canonicalCleanUrl() const
Adaptation::History::Pointer adaptLogHistory() const
Returns possibly nil history, creating it if adapt. logging is enabled.
Auth::UserRequest::Pointer auth_user_request
bool expectingBody(const HttpRequestMethod &unused, int64_t &) const override
bool canHandle1xx() const
whether the client is likely to be able to handle a 1xx reply
static HttpRequest * FromUrl(const SBuf &url, const MasterXaction::Pointer &, const HttpRequestMethod &method=Http::METHOD_GET)
Http::StatusCode checkEntityFraming() const
Error error
the first transaction problem encountered (or falsy)
Adaptation::Icap::History::Pointer icapHistory() const
Returns possibly nil history, creating it if icap logging is enabled.
AnyP::Uri url
the request URI
void manager(const CbcPointer< ConnStateData > &aMgr, const AccessLogEntryPointer &al)
associates the request with a from-client connection manager
const SBuf & effectiveRequestUri() const
RFC 7230 section 5.5 - Effective Request URI.
common parts of HttpRequest and HttpReply
std::optional< KnownPort > Port
validated/supported port number (if any)