9#ifndef SQUID_SRC_HTTP_H
10#define SQUID_SRC_HTTP_H
87 void drop1xx(
const char *reason);
110 void start()
override;
115 void abortAll(
const char *reason)
override;
HttpRequestPointer request
assists in making and relaying entry caching/sharing decision
const Http::StatusCode statusCode
HTTP status for debugging.
Answers answer
the decision id
const StoreEntry * entry
entry for debugging
Answers make(const Answers ans, const char *why)
stores the corresponding decision
const char * reason
the decision reason
void httpStateConnClosed(const CommCloseCbParams ¶ms)
void handleRequestBodyProducerAborted() override
AsyncCall::Pointer closeHandler
Http1::ResponseParserPointer hp
Parser being used at present to parse the HTTP/ICY server response.
String * upgradeHeaderOut
Upgrade header value sent to the origin server or cache peer.
void start() override
called by AsyncStart; do not call directly
const char * blockSwitchingProtocols(const HttpReply &) const
std::optional< size_t > canBufferMoreReplyBytes() const
static bool decideIfWeDoRanges(HttpRequest *orig_request)
void truncateVirginBody()
ConnectionStatus persistentConnStatus() const
void sendComplete()
successfully wrote the entire request (including body, last-chunk, etc.)
void httpTimeout(const CommTimeoutCbParams ¶ms)
ReuseDecision::Answers reusableReply(ReuseDecision &decision)
void checkDateSkew(HttpReply *)
size_t maybeMakeSpaceAvailable(size_t maxReadSize)
bool doneWithServer() const override
int64_t payloadTruncated
positive when we read more than we wanted
void haveParsedReplyHeaders() override
called when we have final (possibly adapted) reply headers; kids extend
static void httpBuildRequestHeader(HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &al, HttpHeader *hdr_out, const CachePeer *peer, const Http::StateFlags &flags)
void requestBodyHandler(MemBuf &)
void abortTransaction(const char *reason)
mb_size_t buildRequestPrefix(MemBuf *mb)
void readReply(const CommIoCbParams &io)
void handle1xx(const HttpReplyPointer &)
ignore or start forwarding the 1xx response (a.k.a., control message)
SBuf inBuf
I/O buffer for receiving server responses.
bool getMoreRequestBody(MemBuf &buf) override
either fill buf with available [encoded] request body bytes or return false
void abortAll(const char *reason) override
abnormal transaction termination; reason is for debugging only
CBDATA_CHILD(HttpStateData)
void processSurrogateControl(HttpReply *)
ConnectionStatus statusIfComplete() const
void processReplyBody() override
bool decodeAndWriteReplyBody()
bool waitingForCommRead
whether we are waiting for our Comm::Read() handler to be called
size_t calcReadBufferCapacityLimit() const
void markPrematureReplyBodyEofFailure()
called on a premature EOF discovered when reading response body
bool mayReadVirginReplyBody() const override
whether we may receive more virgin response body bytes
bool continueAfterParsingHeader()
void maybeReadVirginBody() override
read response data from the network
int64_t payloadSeen
amount of message payload/body received so far.
@ COMPLETE_PERSISTENT_MSG
@ COMPLETE_NONPERSISTENT_MSG
bool peerSupportsConnectionPinning() const
void closeServer() override
void wroteLast(const CommIoCbParams &io)
called after writing the very last request byte (body, last-chunk, etc)
void processReplyHeader()
void noteDelayAwareReadChance() override
const Comm::ConnectionPointer & dataConnection() const override
void sentRequestBody(const CommIoCbParams &io) override
Comm::ConnectionPointer serverConnection
~HttpStateData() override
void proceedAfter1xx()
restores state and resumes processing after 1xx is ignored or forwarded
bool finishingChunkedRequest()
if needed, write last-chunk to end the request body and return true
void forwardUpgrade(HttpHeader &)
void keepaliveAccounting(HttpReply *)
Http1::TeChunkedParser * httpChunkDecoder
bool finishingBrokenPost()
if broken posts are enabled for the request, try to fix and return true
void drop1xx(const char *reason)
void doneSendingRequestBody() override
int httpCachable(const HttpRequestMethod &)
SBuf httpMakeVaryMark(HttpRequest *request, HttpReply const *reply)
void httpStart(FwdState *)
std::ostream & operator<<(std::ostream &os, const HttpStateData::ReuseDecision &d)