#include <client_side_reply.h>

Inheritance diagram for clientReplyContext:
Collaboration diagram for clientReplyContext:

Classes

struct  Flags
 

Public Member Functions

void * operator new (size_t size)
 
void operator delete (void *address)
 
void * toCbdata () noexcept
 
 clientReplyContext (ClientHttpRequest *)
 
 ~clientReplyContext () override
 
void saveState ()
 
void restoreState ()
 
void purgeRequest ()
 
void doGetMoreData ()
 
void identifyStoreObject ()
 
void identifyFoundObject (StoreEntry *entry, const char *detail)
 
int storeOKTransferDone () const
 
int storeNotOKTransferDone () const
 
void setReplyToStoreEntry (StoreEntry *e, const char *reason)
 replaces current response store entry with the given one More...
 
void setReplyToError (err_type, Http::StatusCode, char const *, const ConnStateData *, HttpRequest *, const char *, Auth::UserRequest::Pointer)
 builds error using clientBuildError() and calls setReplyToError() below More...
 
void setReplyToError (const HttpRequestMethod &method, ErrorState *err)
 creates a store entry for the reply and appends err to it More...
 
void setReplyToReply (HttpReply *reply)
 creates a store entry for the reply and appends error reply to it More...
 
void createStoreEntry (const HttpRequestMethod &m, RequestFlags flags)
 
void removeStoreReference (store_client **scp, StoreEntry **ep)
 
void removeClientStoreReference (store_client **scp, ClientHttpRequest *http)
 
void startError (ErrorState *err)
 
void processExpired ()
 
clientStream_status_t replyStatus ()
 
void processMiss ()
 
void traceReply ()
 
const char * storeId () const
 
LogTagsloggingTags () const override
 

Public Attributes

Http::StatusCode purgeStatus
 
ClientHttpRequesthttp
 
store_clientsc
 
char tempbuf [HTTP_REQBUF_SZ]
 
struct clientReplyContext::Flags flags
 
clientStreamNodeourNode
 

Static Public Attributes

static STCB CacheHit
 
static STCB HandleIMSReply
 
static STCB SendMoreData
 

Protected Member Functions

bool startCollapsingOn (const StoreEntry &, const bool doingRevalidation) const
 
bool mayInitiateCollapsing () const
 whether Squid configuration allows us to become a CF initiator More...
 
bool onCollapsingPath () const
 whether Squid configuration allows collapsing for this transaction More...
 

Private Types

enum  CollapsedRevalidation {
  crNone = 0 ,
  crInitiator ,
  crSlave
}
 

Private Member Functions

void fillChecklist (ACLFilledChecklist &) const override
 configure the given checklist (to reflect the current transaction state) More...
 
clientStreamNodegetNextNode () const
 
void makeThisHead ()
 
bool errorInStream (const StoreIOBuffer &result) const
 
bool matchesStreamBodyBuffer (const StoreIOBuffer &) const
 
void sendStreamError (StoreIOBuffer const &result)
 
void pushStreamData (const StoreIOBuffer &)
 
clientStreamNodenext () const
 
void processReplyAccess ()
 
void processReplyAccessResult (const Acl::Answer &accessAllowed)
 
void cloneReply ()
 
void buildReplyHeader ()
 
bool alwaysAllowResponse (Http::StatusCode sline) const
 
int checkTransferDone ()
 
void processOnlyIfCachedMiss ()
 
bool processConditional ()
 process conditional request from client More...
 
void noteStreamBufferredBytes (const StoreIOBuffer &)
 
void cacheHit (StoreIOBuffer result)
 
void handleIMSReply (StoreIOBuffer result)
 
void sendMoreData (StoreIOBuffer result)
 
void triggerInitialStoreRead (STCB=SendMoreData)
 
void requestMoreBodyFromStore ()
 
void sendClientOldEntry ()
 
void purgeAllCached ()
 
bool purgeEntry (StoreEntry &, const Http::MethodType, const char *descriptionPrefix="")
 
void purgeDoPurge ()
 releases both cached GET and HEAD entries More...
 
void forgetHit ()
 
bool blockedHit () const
 whether squid.conf send_hit prevents us from serving this hit More...
 
const char * storeLookupString (bool found) const
 
void detailStoreLookup (const char *detail)
 remembers the very first Store lookup classification, ignoring the rest More...
 
void sendBodyTooLargeError ()
 
void sendPreconditionFailedError ()
 send 412 (Precondition Failed) to client More...
 
void sendNotModified ()
 send 304 (Not Modified) to client More...
 
void sendNotModifiedOrPreconditionFailedError ()
 
void sendClientUpstreamResponse (const StoreIOBuffer &upstreamResponse)
 

Private Attributes

HttpReplyreply
 
const char * firstStoreLookup_ = nullptr
 
StoreEntryold_entry
 
store_clientold_sc
 
time_t old_lastmod
 
String old_etag
 
bool deleting
 
CollapsedRevalidation collapsedRevalidation
 
StoreIOBuffer lastStreamBufferedBytes
 HTTP response body bytes stored in our Client Stream buffer (if any) More...
 

Static Private Attributes

static cbdata_type CBDATA_clientReplyContext = CBDATA_UNKNOWN
 
static ACLCB ProcessReplyAccessResult
 
static decltype(::storeClientCopy) storeClientCopy
 

Friends

CSR clientGetMoreData
 

Detailed Description

Definition at line 22 of file client_side_reply.h.

Member Enumeration Documentation

◆ CollapsedRevalidation

Enumerator
crNone 

collapsed revalidation is not allowed for this context

crInitiator 

we initiated collapsed revalidation request

crSlave 

we collapsed on the existing revalidation request

Definition at line 152 of file client_side_reply.h.

Constructor & Destructor Documentation

◆ clientReplyContext()

clientReplyContext::clientReplyContext ( ClientHttpRequest clientContext)

Definition at line 74 of file client_side_reply.cc.

References tempbuf.

◆ ~clientReplyContext()

clientReplyContext::~clientReplyContext ( )
override

Member Function Documentation

◆ alwaysAllowResponse()

bool clientReplyContext::alwaysAllowResponse ( Http::StatusCode  sline) const
private

◆ blockedHit()

◆ buildReplyHeader()

void clientReplyContext::buildReplyHeader ( )
private

Generate the reply headers sent to client.

Filters out unwanted entries and hop-by-hop from original reply header then adds extra entries if we have more info than origin server then adds Squid specific entries

Definition at line 1211 of file client_side_reply.cc.

References ClientHttpRequest::Flags::accel, RequestFlags::accelerated, Auth::UserRequest::AddReplyAuthHeader(), HttpHeader::addVia(), Http::AGE, ClientHttpRequest::al, SBuf::append(), HttpRequest::auth_user_request, HttpReply::bodySize(), SBuf::c_str(), Http::CACHE_STATUS, LogTags::cacheStatusSource(), RequestFlags::chunkedReply, SquidConfig::client_pconns, collapsedRevalidation, Config, conn, Http::CONNECTION, RequestFlags::connectionAuth, RequestFlags::connectionAuthDisabled, crSlave, Http::DATE, DBG_IMPORTANT, debugs, HttpHeader::delAt(), HttpHeader::delById(), StoreEntry::dump(), EBIT_TEST, ENTRY_SPECIAL, SquidConfig::error_pconns, Http::EXPIRES, StoreEntry::expires, fdUsageHigh(), HttpHeader::findEntry(), firstStoreLookup_, ClientHttpRequest::flags, HttpRequest::flags, StoreEntry::flags, ClientHttpRequest::getConn(), HttpHeader::getEntry(), HttpHeader::has(), Http::Message::header, http, Http::Message::http_ver, httpHdrMangleList(), HttpHeaderInitPos, httpHeaderPutStrf(), HttpHeaderEntry::id, RequestFlags::intercepted, Comm::IsConnOpen(), LogTags::isTcpHit(), HttpReply::keep_alive, LOG_TCP_DENIED, ClientHttpRequest::loggingTags(), ClientHttpRequest::memObject(), HttpRequest::method, HttpRequest::multipartRangeRequest(), RequestFlags::mustKeepalive, LogTags::oldType, SquidConfig::onoff, HttpRequest::peer_login, Http::Message::persistent(), HttpRequest::pinnedConnection(), ConnStateData::port, PRId64, AnyP::PROTO_HTTP, AnyP::ProtocolVersion::protocol, Http::ProtocolVersion(), Http::PROXY_AUTHENTICATE, Http::PROXY_SUPPORT, RequestFlags::proxyKeepalive, HttpHeader::putExt(), HttpHeader::putInt(), HttpHeader::putStr(), HttpHeader::putTime(), String::rawBuf(), HttpHeader::refreshMask(), HttpHeader::removeHopByHopEntries(), HttpReply::removeIrrelevantContentLength(), reply, ClientHttpRequest::request, ClientHttpRequest::requestSatisfactionMode(), ROR_REPLY, Http::scProxyAuthenticationRequired, Http::scUnauthorized, Http::SET_COOKIE, shutting_down, HttpReply::sline, squid_curtime, RequestFlags::sslBumped, Http::StatusLine::status(), ClientHttpRequest::storeEntry(), Http::SURROGATE_CAPABILITY, Http::SURROGATE_CONTROL, String::termedBuf(), StoreEntry::timestamp, Http::TRANSFER_ENCODING, uniqueHostname(), ClientHttpRequest::uri, HttpHeaderEntry::value, Http::StatusLine::version, Http::WWW_AUTHENTICATE, and Http::X_REQUEST_URI.

Referenced by cloneReply().

◆ cacheHit()

void clientReplyContext::cacheHit ( StoreIOBuffer  result)
private

Processes HTTP response headers received from Store on a suspected cache hit path. May be called several times (e.g., a Vary marker object hit followed by the corresponding variant hit).

Ignore if the HIT object is being deleted.

Definition at line 518 of file client_side_reply.cc.

References assert, blockedHit(), StoreEntry::checkNegativeHit(), clientGetMoreData, SBuf::cmp(), HttpRequest::conditional(), Config, DBG_IMPORTANT, debugs, deleting, EBIT_TEST, ENTRY_ABORTED, StoreIOBuffer::error, HttpRequest::flags, StoreEntry::flags, StoreIOBuffer::flags, AnyP::Uri::getScheme(), http, IN_MEMORY, RequestFlags::internal, StoreEntry::lastModified(), LOG_TCP_CLIENT_REFRESH_MISS, LOG_TCP_HIT, LOG_TCP_MEM_HIT, LOG_TCP_MISS, LOG_TCP_NEGATIVE_HIT, LOG_TCP_OFFLINE_HIT, LOG_TCP_SWAPFAIL_MISS, ClientHttpRequest::loggingTags(), StoreEntry::mayStartHitting(), StoreEntry::mem_obj, StoreEntry::mem_status, HttpRequest::method, Http::METHOD_PURGE, RequestFlags::needValidation, RequestFlags::noCache, RequestFlags::noCacheHack(), noteStreamBufferredBytes(), SquidConfig::offline, LogTags::oldType, SquidConfig::onoff, ourNode, processConditional(), processExpired(), processMiss(), AnyP::PROTO_HTTP, AnyP::PROTO_HTTPS, purgeRequest(), refreshCheckHTTP(), removeClientStoreReference(), ClientHttpRequest::request, sc, sendMoreData(), STORE_OK, StoreEntry::store_status, ClientHttpRequest::storeEntry(), HttpRequest::storeId(), MemObject::storeId(), ClientHttpRequest::updateLoggingTags(), ClientHttpRequest::uri, HttpRequest::url, VARY_CANCEL, VARY_MATCH, VARY_NONE, VARY_OTHER, and varyEvaluateMatch().

◆ checkTransferDone()

◆ cloneReply()

◆ createStoreEntry()

◆ detailStoreLookup()

void clientReplyContext::detailStoreLookup ( const char *  detail)
private

Definition at line 1585 of file client_side_reply.cc.

References debugs, and firstStoreLookup_.

Referenced by identifyFoundObject(), and purgeDoPurge().

◆ doGetMoreData()

◆ errorInStream()

bool clientReplyContext::errorInStream ( const StoreIOBuffer result) const
private

◆ fillChecklist()

void clientReplyContext::fillChecklist ( ACLFilledChecklist ) const
overrideprivatevirtual

Implements Acl::ChecklistFiller.

Definition at line 2073 of file client_side_reply.cc.

References clientAclChecklistFill(), and http.

◆ forgetHit()

void clientReplyContext::forgetHit ( )
private

Safely disposes of an entry pointing to a cache hit that we do not want. We cannot just ignore the entry because it may be locking or otherwise holding an associated cache resource of some sort.

Definition at line 1469 of file client_side_reply.cc.

References assert, http, StoreEntry::lock(), ClientHttpRequest::storeEntry(), and StoreEntry::unlock().

Referenced by identifyFoundObject().

◆ getNextNode()

clientStreamNode * clientReplyContext::getNextNode ( ) const
private

Definition at line 229 of file client_side_reply.cc.

References dlink_node::data, dlink_node::next, clientStreamNode::node, and ourNode.

Referenced by next().

◆ handleIMSReply()

◆ identifyFoundObject()

void clientReplyContext::identifyFoundObject ( StoreEntry newEntry,
const char *  detail 
)

Check state of the current StoreEntry object. to see if we can determine the final status of the request.

  • If the request has no-cache flag set or some no_cache HACK in operation we 'invalidate' the cached IP entries for this request ???
  • If no StoreEntry object is current assume this object isn't in the cache set MISS
  • If we are running in offline mode set to HIT
  • If redirection status is True force this to be a MISS

Definition at line 1506 of file client_side_reply.cc.

References Config, debugs, detailStoreLookup(), doGetMoreData(), EBIT_TEST, ENTRY_SPECIAL, HttpRequest::flags, forgetHit(), AnyP::Uri::host(), http, ipcacheInvalidateNegative(), LOG_TCP_CLIENT_REFRESH_MISS, LOG_TCP_HIT, LOG_TCP_MISS, LOG_TCP_REDIRECT, RequestFlags::noCache, RequestFlags::noCacheHack(), SquidConfig::offline, SquidConfig::onoff, ClientHttpRequest::redirect, ClientHttpRequest::request, StoreClient::startCollapsingOn(), ClientHttpRequest::Redirect::status, ClientHttpRequest::storeEntry(), ClientHttpRequest::updateLoggingTags(), and HttpRequest::url.

Referenced by identifyStoreObject().

◆ identifyStoreObject()

◆ loggingTags()

LogTags * clientReplyContext::loggingTags ( ) const
overridevirtual
Returns
LogTags (if the class logs transactions) or nil (otherwise)

Implements StoreClient.

Definition at line 887 of file client_side_reply.cc.

References ClientHttpRequest::al, AccessLogEntry::cache, AccessLogEntry::CacheDetails::code, and http.

◆ makeThisHead()

void clientReplyContext::makeThisHead ( )
private

◆ matchesStreamBodyBuffer()

bool clientReplyContext::matchesStreamBodyBuffer ( const StoreIOBuffer their) const
private

Whether the given body area describes the start of our Client Stream buffer. An empty area does.

Definition at line 2049 of file client_side_reply.cc.

References Assure, clientStreamNode::data, StoreIOBuffer::data, debugs, StoreIOBuffer::error, StoreIOBuffer::flags, StoreIOBuffer::length, and next().

Referenced by noteStreamBufferredBytes(), processReplyAccessResult(), sendClientOldEntry(), and sendMoreData().

◆ mayInitiateCollapsing()

bool StoreClient::mayInitiateCollapsing ( ) const
inlineprotectedinherited

Definition at line 58 of file StoreClient.h.

References StoreClient::onCollapsingPath().

Referenced by createStoreEntry(), and processExpired().

◆ next()

◆ noteStreamBufferredBytes()

void clientReplyContext::noteStreamBufferredBytes ( const StoreIOBuffer result)
private

Definition at line 2066 of file client_side_reply.cc.

References Assure, lastStreamBufferedBytes, and matchesStreamBodyBuffer().

Referenced by cacheHit(), and sendMoreData().

◆ onCollapsingPath()

◆ operator delete()

void clientReplyContext::operator delete ( void *  address)
inline

Definition at line 24 of file client_side_reply.h.

◆ operator new()

void * clientReplyContext::operator new ( size_t  size)
inline

Definition at line 24 of file client_side_reply.h.

◆ processConditional()

◆ processExpired()

◆ processMiss()

void clientReplyContext::processMiss ( )

Prepare to fetch the object as it's a cache miss of some kind.

We might have a left-over StoreEntry from a failed cache hit or IMS request.

Check if its a PURGE request to be actioned.

Check if its an 'OTHER' request. Purge all cached entries if so and continue.

Check if 'only-if-cached' flag is set. Action if so.

Deny loops

Start forwarding to get the new object from network

Definition at line 696 of file client_side_reply.cc.

References ClientHttpRequest::al, assert, LogTags::c_str(), clientBuildError(), Server::clientConnection, HttpRequest::clientConnectionManager, AccessLogEntry::HttpDetails::code, StoreEntry::complete(), conn, createStoreEntry(), DBG_CRITICAL, debugs, StoreEntry::dump(), EBIT_TEST, ENTRY_SPECIAL, ERR_ACCESS_DENIED, errorAppendEntry(), HttpRequest::flags, StoreEntry::flags, ClientHttpRequest::getConn(), AccessLogEntry::http, http, ClientHttpRequest::Redirect::location, LOG_TCP_REDIRECT, ClientHttpRequest::loggingTags(), RequestFlags::loopDetected, HttpRequest::method, Http::METHOD_OTHER, Http::METHOD_PURGE, ClientHttpRequest::Out::offset, ClientHttpRequest::onlyIfCached(), ClientHttpRequest::out, processOnlyIfCachedMiss(), purgeAllCached(), purgeRequest(), ClientHttpRequest::redirect, HttpReply::redirect(), StoreEntry::releaseRequest(), removeClientStoreReference(), StoreEntry::replaceHttpReply(), ClientHttpRequest::request, sc, Http::scForbidden, FwdState::Start(), ClientHttpRequest::Redirect::status, ClientHttpRequest::storeEntry(), triggerInitialStoreRead(), ClientHttpRequest::updateLoggingTags(), and ClientHttpRequest::uri.

Referenced by cacheHit(), doGetMoreData(), handleIMSReply(), and processConditional().

◆ processOnlyIfCachedMiss()

void clientReplyContext::processOnlyIfCachedMiss ( )
private

client issued a request with an only-if-cached cache-control directive; we did not find a cached object that can be returned without contacting other servers; respond with a 504 (Gateway Timeout) as suggested in [RFC 2068]

Definition at line 772 of file client_side_reply.cc.

References ClientHttpRequest::al, clientBuildError(), AccessLogEntry::HttpDetails::code, debugs, ERR_ONLY_IF_CACHED_MISS, ClientHttpRequest::getConn(), AccessLogEntry::http, http, HttpRequest::method, removeClientStoreReference(), ClientHttpRequest::request, sc, Http::scGatewayTimeout, startError(), and ClientHttpRequest::uri.

Referenced by processExpired(), and processMiss().

◆ processReplyAccess()

void clientReplyContext::processReplyAccess ( )
private

◆ processReplyAccessResult()

◆ purgeAllCached()

void clientReplyContext::purgeAllCached ( )
private

◆ purgeDoPurge()

◆ purgeEntry()

bool clientReplyContext::purgeEntry ( StoreEntry entry,
const Http::MethodType  methodType,
const char *  descriptionPrefix = "" 
)
private

attempts to release the cached entry

Returns
whether the entry was released

Definition at line 980 of file client_side_reply.cc.

References debugs, HTCP_CLR_PURGE, http, Http::MethodStr(), neighborsHtcpClear(), purgeStatus, StoreEntry::release(), ClientHttpRequest::request, Http::scOkay, and StoreEntry::url().

Referenced by purgeDoPurge().

◆ purgeRequest()

◆ pushStreamData()

◆ removeClientStoreReference()

◆ removeStoreReference()

void clientReplyContext::removeStoreReference ( store_client **  scp,
StoreEntry **  ep 
)

◆ replyStatus()

◆ requestMoreBodyFromStore()

void clientReplyContext::requestMoreBodyFromStore ( )
private

Request HTTP response body bytes from Store into next()->readBuffer. This method requests body bytes at readerBuffer.offset and, hence, it should only be called after we triggerInitialStoreRead() and get the requested HTTP response headers (using zero offset).

Definition at line 251 of file client_side_reply.cc.

References http, lastStreamBufferedBytes, next(), sc, SendMoreData, storeClientCopy, and ClientHttpRequest::storeEntry().

Referenced by clientGetMoreData().

◆ restoreState()

◆ saveState()

void clientReplyContext::saveState ( )

◆ sendBodyTooLargeError()

◆ sendClientOldEntry()

◆ sendClientUpstreamResponse()

void clientReplyContext::sendClientUpstreamResponse ( const StoreIOBuffer upstreamResponse)
private

◆ sendMoreData()

◆ sendNotModified()

◆ sendNotModifiedOrPreconditionFailedError()

void clientReplyContext::sendNotModifiedOrPreconditionFailedError ( )
private

send 304 (Not Modified) or 412 (Precondition Failed) to client depending on request method

Definition at line 1815 of file client_side_reply.cc.

References http, HttpRequest::method, Http::METHOD_GET, Http::METHOD_HEAD, ClientHttpRequest::request, sendNotModified(), and sendPreconditionFailedError().

Referenced by processConditional().

◆ sendPreconditionFailedError()

◆ sendStreamError()

void clientReplyContext::sendStreamError ( StoreIOBuffer const &  result)
private

call clientWriteComplete so the client socket gets closed

We call into the stream, because we don't know that there is a client socket!

Definition at line 1721 of file client_side_reply.cc.

References ClientHttpRequest::client_stream, clientStreamCallback(), clientReplyContext::Flags::complete, dlink_node::data, debugs, StoreIOBuffer::error, flags, HttpRequest::flags, StoreIOBuffer::flags, dlink_list::head, http, ClientHttpRequest::request, and RequestFlags::streamError.

Referenced by sendMoreData().

◆ setReplyToError() [1/2]

◆ setReplyToError() [2/2]

void clientReplyContext::setReplyToError ( err_type  err,
Http::StatusCode  status,
char const *  uri,
const ConnStateData conn,
HttpRequest failedrequest,
const char *  unparsedrequest,
Auth::UserRequest::Pointer  auth_user_request 
)

Create an error in the store awaiting the client side to read it.

This may be better placed in the clientStream logic, but it has not been relocated there yet

Definition at line 95 of file client_side_reply.cc.

References ClientHttpRequest::al, clientBuildError(), conn, http, HttpRequest::method, Http::METHOD_NONE, setReplyToError(), and xstrdup.

Referenced by ConnStateData::abortChunkedRequestBody(), clientProcessRequest(), Http::One::Server::processParsedRequest(), ConnStateData::serveDelayedError(), Http::One::Server::setReplyError(), and setReplyToError().

◆ setReplyToReply()

◆ setReplyToStoreEntry()

◆ startCollapsingOn()

bool StoreClient::startCollapsingOn ( const StoreEntry e,
const bool  doingRevalidation 
) const
protectedinherited
Returns
whether the caller must collapse on the given entry Before returning true, updates common collapsing-related stats. See also: StoreEntry::hittingRequiresCollapsing().

Definition at line 66 of file store_client.cc.

References debugs, StoreEntry::hittingRequiresCollapsing(), StoreClient::loggingTags(), and StoreClient::onCollapsingPath().

Referenced by htcpSpecifier::checkHit(), ICPState::confirmAndPrepHit(), identifyFoundObject(), processExpired(), and UrnState::start().

◆ startError()

◆ storeId()

const char * clientReplyContext::storeId ( ) const
inline

◆ storeLookupString()

const char * clientReplyContext::storeLookupString ( bool  found) const
inlineprivate

Definition at line 124 of file client_side_reply.h.

Referenced by identifyStoreObject(), and purgeDoPurge().

◆ storeNotOKTransferDone()

◆ storeOKTransferDone()

◆ toCbdata()

void * clientReplyContext::toCbdata ( )
inlinenoexcept

Definition at line 24 of file client_side_reply.h.

◆ traceReply()

◆ triggerInitialStoreRead()

void clientReplyContext::triggerInitialStoreRead ( STCB  recipient = SendMoreData)
private

Request HTTP response headers from Store, to be sent to the given recipient. That recipient also gets zero, some, or all HTTP response body bytes (into next()->readBuffer).

Definition at line 238 of file client_side_reply.cc.

References Assure, clientStreamNode::data, HandleIMSReply, http, lastStreamBufferedBytes, next(), sc, storeClientCopy, and ClientHttpRequest::storeEntry().

Referenced by doGetMoreData(), processMiss(), purgeDoPurge(), sendNotModified(), startError(), and traceReply().

Friends And Related Function Documentation

◆ clientGetMoreData

friend CSR clientGetMoreData
friend

Definition at line 164 of file client_side_reply.h.

Referenced by cacheHit().

Member Data Documentation

◆ CacheHit

void clientReplyContext::CacheHit
static

Processes HTTP response headers received from Store on a suspected cache hit path. May be called several times (e.g., a Vary marker object hit followed by the corresponding variant hit).

Definition at line 27 of file client_side_reply.h.

Referenced by doGetMoreData().

◆ CBDATA_clientReplyContext

cbdata_type clientReplyContext::CBDATA_clientReplyContext = CBDATA_UNKNOWN
staticprivate

Definition at line 24 of file client_side_reply.h.

◆ collapsedRevalidation

CollapsedRevalidation clientReplyContext::collapsedRevalidation
private

◆ deleting

bool clientReplyContext::deleting
private

Definition at line 150 of file client_side_reply.h.

Referenced by ~clientReplyContext(), cacheHit(), handleIMSReply(), and sendMoreData().

◆ firstStoreLookup_

const char* clientReplyContext::firstStoreLookup_ = nullptr
private

Classification of the initial Store lookup. This very first lookup happens without the Vary-driven key augmentation. TODO: Exclude internal Store match bans from the "mismatch" category.

Definition at line 142 of file client_side_reply.h.

Referenced by buildReplyHeader(), and detailStoreLookup().

◆ flags

◆ HandleIMSReply

void clientReplyContext::HandleIMSReply
static

Definition at line 28 of file client_side_reply.h.

Referenced by processExpired(), and triggerInitialStoreRead().

◆ http

◆ lastStreamBufferedBytes

StoreIOBuffer clientReplyContext::lastStreamBufferedBytes
private

◆ old_entry

StoreEntry* clientReplyContext::old_entry
private

◆ old_etag

String clientReplyContext::old_etag
private

Definition at line 148 of file client_side_reply.h.

Referenced by restoreState(), and saveState().

◆ old_lastmod

time_t clientReplyContext::old_lastmod
private

Definition at line 147 of file client_side_reply.h.

Referenced by restoreState(), and saveState().

◆ old_sc

store_client* clientReplyContext::old_sc
private

◆ ourNode

clientStreamNode* clientReplyContext::ourNode

Definition at line 86 of file client_side_reply.h.

Referenced by cacheHit(), clientGetMoreData(), and getNextNode().

◆ ProcessReplyAccessResult

void clientReplyContext::ProcessReplyAccessResult
staticprivate

Definition at line 101 of file client_side_reply.h.

Referenced by processReplyAccess().

◆ purgeStatus

Http::StatusCode clientReplyContext::purgeStatus

Definition at line 65 of file client_side_reply.h.

Referenced by purgeDoPurge(), and purgeEntry().

◆ reply

◆ sc

◆ SendMoreData

void clientReplyContext::SendMoreData
static

Accepts chunk of a http message in buf, parses prefix, filters headers and such, writes processed message to the message recipient

Definition at line 29 of file client_side_reply.h.

Referenced by requestMoreBodyFromStore().

◆ storeClientCopy

decltype(::storeClientCopy) clientReplyContext::storeClientCopy
staticprivate

Reduces a chance of an accidental direct storeClientCopy() call that (should but) forgets to invalidate our lastStreamBufferedBytes. This function is not defined; decltype() syntax prohibits "= delete", but function usage will trigger deprecation warnings and linking errors.

Definition at line 137 of file client_side_reply.h.

Referenced by processExpired(), requestMoreBodyFromStore(), and triggerInitialStoreRead().

◆ tempbuf

char clientReplyContext::tempbuf[HTTP_REQBUF_SZ]

Buffer dedicated to receiving storeClientCopy() responses to generated revalidation requests. These requests cannot use next()->readBuffer because the latter keeps the contents of the stale HTTP response during revalidation. sendClientOldEntry() uses that contents.

Definition at line 77 of file client_side_reply.h.

Referenced by clientReplyContext(), and processExpired().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors