#include <client_side.h>

Inheritance diagram for ConnStateData:
Collaboration diagram for ConnStateData:


class  PinnedIdleContext
 parameters for the async notePinnedConnectionBecameIdle() call More...
class  ServerConnectionContext
 noteTakeServerConnectionControl() callback parameter More...

Public Types

typedef CbcPointer< AsyncJobPointer
typedef CbcPointer< BodyProducerPointer

Public Member Functions

 ConnStateData (const MasterXactionPointer &xact)
virtual ~ConnStateData ()
virtual void receivedFirstByte ()
 Update flags and timeout after the first byte received. More...
virtual bool handleReadData ()
virtual void afterClientRead ()
 processing to be done after a Comm::Read() More...
virtual void afterClientWrite (size_t)
 processing to sync state after a Comm::Write() More...
virtual void sendControlMsg (HttpControlMsg)
 called to send the 1xx message and notify the Source More...
virtual void doneWithControlMsg ()
bool clientParseRequests ()
 Traffic parsing. More...
void readNextRequest ()
void kick ()
 try to make progress on a transaction or read more I/O More...
bool isOpen () const
int64_t mayNeedToReadMoreBody () const
const Auth::UserRequest::PointergetAuth () const
void setAuth (const Auth::UserRequest::Pointer &aur, const char *cause)
bool transparent () const
const char * stoppedReceiving () const
 true if we stopped receiving the request More...
const char * stoppedSending () const
 true if we stopped sending the response More...
void stopReceiving (const char *error)
 note request receiving error and close as soon as we write the response More...
void stopSending (const char *error)
 note response sending error and close as soon as we read the request More...
void resetReadTimeout (time_t timeout)
 (re)sets timeout for receiving more bytes from the client More...
void extendLifetime ()
 (re)sets client_lifetime timeout More...
void expectNoForwarding ()
 cleans up virgin request [body] forwarding state More...
BodyPipe::Pointer expectRequestBody (int64_t size)
virtual void noteMoreBodySpaceAvailable (BodyPipe::Pointer)=0
virtual void noteBodyConsumerAborted (BodyPipe::Pointer)=0
bool handleRequestBodyData ()
void notePinnedConnectionBecameIdle (PinnedIdleContext pic)
 Called when a pinned connection becomes available for forwarding the next request. More...
void pinBusyConnection (const Comm::ConnectionPointer &pinServerConn, const HttpRequest::Pointer &request)
void unpinConnection (const bool andClose)
 Undo pinConnection() and, optionally, close the pinned connection. More...
CachePeerpinnedPeer () const
bool pinnedAuth () const
virtual void notePeerConnection (Comm::ConnectionPointer)
 called just before a FwdState-dispatched job starts using connection More...
virtual void clientPinnedConnectionClosed (const CommCloseCbParams &io)
 Our close handler called by Comm when the pinned connection is closed. More...
virtual void noteTakeServerConnectionControl (ServerConnectionContext)
void clientReadFtpData (const CommIoCbParams &io)
void connStateClosed (const CommCloseCbParams &io)
void requestTimeout (const CommTimeoutCbParams &params)
void lifetimeTimeout (const CommTimeoutCbParams &params)
virtual void start ()
 called by AsyncStart; do not call directly More...
virtual bool doneAll () const
 whether positive goal has been reached More...
virtual void swanSong ()
virtual void callException (const std::exception &)
 called when the job throws during an async call More...
void quitAfterError (HttpRequest *request)
void stopPinnedConnectionMonitoring ()
 The caller assumes responsibility for connection closure detection. More...
Security::IoResult acceptTls ()
void postHttpsAccept ()
 the second part of old httpsAccept, waiting for future HttpsServer home More...
void startPeekAndSplice ()
 Initializes and starts a peek-and-splice negotiation with the SSL client. More...
void doPeekAndSpliceStep ()
void httpsPeeked (PinnedIdleContext pic)
 called by FwdState when it is done bumping the server More...
bool splice ()
 Splice a bumped client connection on peek-and-splice mode. More...
void getSslContextStart ()
 Start to create dynamic Security::ContextPointer for host or uses static port SSL context. More...
void getSslContextDone (Security::ContextPointer &)
 finish configuring the newly created SSL context" More...
void sslCrtdHandleReply (const Helper::Reply &reply)
 Process response from ssl_crtd. More...
void switchToHttps (ClientHttpRequest *, Ssl::BumpMode bumpServerMode)
void parseTlsHandshake ()
bool switchedToHttps () const
Ssl::ServerBumpserverBump ()
void setServerBump (Ssl::ServerBump *srvBump)
const SBufsslCommonName () const
void resetSslCommonName (const char *name)
const SBuftlsClientSni () const
void buildSslCertGenerationParams (Ssl::CertificateProperties &certProperties)
bool serveDelayedError (Http::Stream *)
char * prepareTlsSwitchingURL (const Http1::RequestParserPointer &hp)
void add (const Http::StreamPointer &context)
 registers a newly created stream More...
virtual bool writeControlMsgAndCall (HttpReply *rep, AsyncCall::Pointer &call)=0
 handle a control message received by context from a peer and call back More...
virtual void handleReply (HttpReply *header, StoreIOBuffer receivedData)=0
void consumeInput (const size_t byteCount)
 remove no longer needed leading bytes from the input buffer More...
Http::StreamabortRequestParsing (const char *const errUri)
 stop parsing the request and create context for relaying error info More...
bool fakeAConnectRequest (const char *reason, const SBuf &payload)
bool initiateTunneledRequest (HttpRequest::Pointer const &cause, Http::MethodType const method, const char *reason, const SBuf &payload)
 generates and sends to tunnel.cc a fake request with a given payload More...
bool shouldPreserveClientData () const
ClientHttpRequestbuildFakeRequest (Http::MethodType const method, SBuf &useHost, unsigned short usePort, const SBuf &payload)
 build a fake http request More...
virtual void startShutdown ()
virtual void endingShutdown ()
NotePairs::Pointer notes ()
bool hasNotes () const
const ProxyProtocol::HeaderPointerproxyProtocolHeader () const
void updateError (const Error &)
 if necessary, stores new error information (if any) More...
void updateError (const err_type c, const ErrorDetailPointer &d)
 emplacement/convenience wrapper for updateError(const Error &) More...
virtual void fillChecklist (ACLFilledChecklist &) const
 configure the given checklist (to reflect the current transaction state) More...
void fillConnectionLevelDetails (ACLFilledChecklist &) const
void readSomeData ()
 maybe grow the inBuf and schedule Comm::Read() More...
bool reading () const
 whether Comm::Read() is scheduled More...
void stopReading ()
 cancels Comm::Read() if it is scheduled More...
virtual void writeSomeData ()
 maybe find some data to send and schedule a Comm::Write() More...
void write (MemBuf *mb)
 schedule some data for a Comm::Write() More...
void write (char *buf, int len)
 schedule some data for a Comm::Write() More...
bool writing () const
 whether Comm::Write() is scheduled More...
void maybeMakeSpaceAvailable ()
 grows the available read buffer space (if possible) More...
bool canBeCalled (AsyncCall &call) const
 whether we can be called More...
void callStart (AsyncCall &call)
virtual void callEnd ()
 called right after the called job method More...
void handleStopRequest ()
 process external request to terminate now (i.e. during this async call) More...
virtual void * toCbdata ()=0
void wroteControlMsg (const CommIoCbParams &)
 callback to handle Comm::Write completion More...

Static Public Member Functions

static Comm::ConnectionPointer BorrowPinnedConnection (HttpRequest *, const AccessLogEntryPointer &)
static void sslCrtdHandleReplyWrapper (void *data, const Helper::Reply &reply)
 Callback function. It is called when squid receive message from ssl_crtd. More...
static void Start (const Pointer &job)

Public Attributes

Http1::TeChunkedParserbodyParser = nullptr
 parses HTTP/1.1 chunked request body More...
Ip::Address log_addr
struct {
   bool   readMore = true
 needs comm_read (for this request or new requests) More...
   bool   swanSang = false
struct {
   Comm::ConnectionPointer   serverConnection
   char *   host = nullptr
 host name of pinned connection More...
   int   port = -1
 port of pinned connection More...
   bool   pinned = false
 this connection was pinned More...
   bool   auth = false
 pinned for www authentication More...
   bool   reading = false
 we are monitoring for peer connection closure More...
   bool   zeroReply = false
 server closed w/o response (ERR_ZERO_SIZE_OBJECT) More...
   bool   peerAccessDenied = false
 cache_peer_access denied pinned connection reuse More...
   CachePeer *   peer = nullptr
 CachePeer the connection goes via. More...
   AsyncCall::Pointer   readHandler
 detects serverConnection closure More...
   AsyncCall::Pointer   closeHandler
 The close handler for pinned server side connection. More...
Ssl::BumpMode sslBumpMode = Ssl::bumpEnd
 ssl_bump decision (Ssl::bumpEnd if n/a). More...
Security::HandshakeParser tlsParser
SBuf preservedClientData
Error bareError
 a problem that occurred without a request (e.g., while parsing headers) More...
Security::KeyLogger keyLogger
 managers logging of the being-accepted TLS connection secrets More...
Comm::ConnectionPointer clientConnection
AnyP::ProtocolVersion transferProtocol
SBuf inBuf
 read I/O buffer for the client connection More...
bool receivedFirstByte_
 true if at least one byte received on this connection More...
Pipeline pipeline
 set of requests waiting to be serviced More...
const InstanceId< AsyncJobid
 job identifier More...
AsyncCall::Pointer cbControlMsgSent
 Call to schedule when the control msg has been sent. More...

Protected Member Functions

void startDechunkingRequest ()
 initialize dechunking state More...
void finishDechunkingRequest (bool withSuccess)
 put parsed content into input buffer and clean up More...
void abortChunkedRequestBody (const err_type error)
 quit on errors related to chunked request body handling More...
err_type handleChunkedRequestBody ()
 parses available chunked encoded body bytes, checks size, returns errors More...
Comm::ConnectionPointer borrowPinnedConnection (HttpRequest *, const AccessLogEntryPointer &)
 ConnStateData-specific part of BorrowPinnedConnection() More...
void startPinnedConnectionMonitoring ()
void clientPinnedConnectionRead (const CommIoCbParams &io)
bool handleIdleClientPinnedTlsRead ()
Http::StreamparseHttpRequest (const Http1::RequestParserPointer &)
virtual Http::StreamparseOneRequest ()=0
virtual void processParsedRequest (Http::StreamPointer &)=0
 start processing a freshly parsed request More...
virtual int pipelinePrefetchMax () const
 returning N allows a pipeline of 1+N requests (see pipeline_prefetch) More...
virtual time_t idleTimeout () const =0
 timeout to use when waiting for the next request More...
void whenClientIpKnown ()
bool tunnelOnError (const HttpRequestMethod &, const err_type)
 initiate tunneling if possible or return false otherwise More...
void doClientRead (const CommIoCbParams &io)
void clientWriteDone (const CommIoCbParams &io)
void deleteThis (const char *aReason)
void mustStop (const char *aReason)
bool done () const
 the job is destroyed in callEnd() when done() More...
virtual const char * status () const
 internal cleanup; do not call directly More...
void stopProducingFor (RefCount< BodyPipe > &, bool atEof)

Protected Attributes

BodyPipe::Pointer bodyPipe
 set when we are reading request body More...
bool preservingClientData_ = false
 whether preservedClientData is valid and should be kept up to date More...
AsyncCall::Pointer reader
 set when we are reading More...
AsyncCall::Pointer writer
 set when we are writing More...
const char * stopReason
 reason for forcing done() to be true More...
const char * typeName
 kid (leaf) class name, for debugging More...
AsyncCall::Pointer inCall
 the asynchronous call being handled, if any More...
bool started_ = false
 Start() has finished successfully. More...
bool swanSang_ = false
 swanSong() was called More...

Private Types

typedef void(RegisteredRunner::* Method) ()
 a pointer to one of the above notification methods More...

Private Member Functions

virtual void terminateAll (const Error &, const LogTagsErrors &)
 abort any pending transactions and prevent new ones (by closing) More...
virtual bool shouldCloseOnEof () const
 whether to stop serving our client after reading EOF on its connection More...
void checkLogging ()
 log the last (attempt at) transaction if nobody else did More...
void clientAfterReadingRequests ()
bool concurrentRequestQueueFilled () const
void pinConnection (const Comm::ConnectionPointer &pinServerConn, const HttpRequest &request)
 Forward future client requests using the given server connection. More...
bool proxyProtocolValidateClient ()
bool parseProxyProtocolHeader ()
bool proxyProtocolError (const char *reason)
Security::ContextPointer getTlsContextFromCache (const SBuf &cacheKey, const Ssl::CertificateProperties &certProperties)
void storeTlsContextToCache (const SBuf &cacheKey, Security::ContextPointer &ctx)
void handleSslBumpHandshakeError (const Security::IoResult &)
 process a problematic Security::Accept() result on the SslBump code path More...
void registerRunner ()
void unregisterRunner ()
 unregisters self; safe to call multiple times More...
virtual void finalizeConfig ()
virtual void claimMemoryNeeds ()
virtual void useConfig ()
virtual void startReconfigure ()
virtual void syncConfig ()
virtual void finishShutdown ()
 Meant for cleanup of services needed by the already destroyed objects. More...

Private Attributes

bool needProxyProtocolHeader_ = false
 whether PROXY protocol header is still expected More...
ProxyProtocol::HeaderPointer proxyProtocolHeader_
 the parsed PROXY protocol header More...
Auth::UserRequest::Pointer auth_
 some user details that can be used to perform authentication on this connection More...
bool switchedToHttps_ = false
bool parsingTlsHandshake = false
uint64_t parsedBumpedRequestCount = 0
 The number of parsed HTTP requests headers on a bumped client connection. More...
SBuf tlsConnectHostOrIp
 The TLS server host name appears in CONNECT request or the server ip address for the intercepted requests. More...
unsigned short tlsConnectPort = 0
 The TLS server port number as passed in the CONNECT request. More...
SBuf sslCommonName_
 CN name for SSL certificate generation. More...
SBuf tlsClientSni_
 TLS client delivered SNI value. Empty string if none has been received. More...
SBuf sslBumpCertKey
 Key to use to store/retrieve generated certificate. More...
Ssl::ServerBumpsslServerBump = nullptr
 HTTPS server cert. fetching state for bump-ssl-server-first. More...
Ssl::CertSignAlgorithm signAlgorithm = Ssl::algSignTrusted
 The signing algorithm to use. More...
const char * stoppedSending_ = nullptr
 the reason why we no longer write the response or nil More...
const char * stoppedReceiving_ = nullptr
 the reason why we no longer read the request or nil More...
NotePairs::Pointer theNotes

Detailed Description

Legacy Server code managing a connection to a client.

NP: presents AsyncJob API but does not operate autonomously as a Job. So Must() is not safe to use.

Multiple requests (up to pipeline_prefetch) can be pipelined. This object is responsible for managing which one is currently being fulfilled and what happens to the queue if the current one causes the client connection to be closed early.

Act as a manager for the client connection and passes data in buffer to a Parser relevant to the state (message headers vs body) that is being processed.

Performs HTTP message processing to kick off the actual HTTP request handling objects (Http::Stream, ClientHttpRequest, HttpRequest).

Performs SSL-Bump processing for switching between HTTP and HTTPS protocols.

To terminate a ConnStateData close() the client Comm::Connection it is managing, or for graceful half-close use the stopReceiving() or stopSending() methods.

Definition at line 79 of file client_side.h.

Member Typedef Documentation

◆ Method

typedef void(RegisteredRunner::* RegisteredRunner::Method) ()

Definition at line 90 of file RunnersRegistry.h.

◆ Pointer [1/2]

Definition at line 34 of file AsyncJob.h.

◆ Pointer [2/2]

Definition at line 25 of file BodyPipe.h.

Constructor & Destructor Documentation

◆ ConnStateData()

◆ ~ConnStateData()

ConnStateData::~ConnStateData ( )

Member Function Documentation

◆ abortChunkedRequestBody()

◆ abortRequestParsing()

◆ acceptTls()

Security::IoResult ConnStateData::acceptTls ( )

Starts or resumes accepting a TLS connection. TODO: Make this helper method protected after converting clientNegotiateSSL() into a method.

Definition at line 2286 of file client_side.cc.

References Security::Accept(), assert, Security::KeyLogger::checkpoint(), Server::clientConnection, Comm::Connection::fd, fd_table, and keyLogger.

Referenced by startPeekAndSplice().

◆ add()

void ConnStateData::add ( const Http::StreamPointer context)

◆ afterClientRead()

◆ afterClientWrite()

void ConnStateData::afterClientWrite ( size_t  )

◆ BorrowPinnedConnection()

Comm::ConnectionPointer ConnStateData::BorrowPinnedConnection ( HttpRequest request,
const AccessLogEntryPointer ale 
validated pinned to-server connection, stopping its monitoring
anewly allocated ErrorState if validation fails

Definition at line 3952 of file client_side.cc.

References ERR_CANNOT_FORWARD, ErrorState::NewForwarding(), and request().

Referenced by FwdState::usePinned(), and TunnelStateData::usePinned().

◆ borrowPinnedConnection()

◆ buildFakeRequest()

◆ buildSslCertGenerationParams()

◆ callEnd()

void AsyncJob::callEnd ( )

◆ callException()

void ConnStateData::callException ( const std::exception &  e)

Reimplemented from AsyncJob.

Reimplemented in Ftp::Server.

Definition at line 631 of file client_side.cc.

References AsyncJob::callException(), ERR_GATEWAY_FAILURE, Here, and updateError().

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const

Definition at line 102 of file AsyncJob.cc.

References AsyncCall::cancel(), debugs, HERE(), AsyncJob::inCall, and NULL.

◆ checkLogging()

◆ claimMemoryNeeds()

virtual void RegisteredRunner::claimMemoryNeeds ( )

Called after finalizeConfig(). Meant for announcing memory reservations before memory is allocated.

Reimplemented in MemStoreRr, and IpcIoRr.

Definition at line 51 of file RunnersRegistry.h.

Referenced by RunConfigUsers().

◆ clientAfterReadingRequests()

void ConnStateData::clientAfterReadingRequests ( )

◆ clientParseRequests()

bool ConnStateData::clientParseRequests ( )

Attempt to parse one or more requests from the input buffer. Returns true after completing parsing of at least one request [header]. That includes cases where parsing ended with an error (e.g., a huge request).

Definition at line 1889 of file client_side.cc.

References assert, bodyPipe, Server::clientConnection, concurrentRequestQueueFilled(), Config, debugs, extendLifetime(), flags, HERE(), Server::inBuf, SBuf::isEmpty(), SBuf::length(), SquidConfig::maxRequestHeaderSize, Must, needProxyProtocolHeader_, parsedBumpedRequestCount, parseOneRequest(), parseProxyProtocolHeader(), pinning, preservingClientData_, processParsedRequest(), switchedToHttps(), and whenClientIpKnown().

Referenced by afterClientRead(), and kick().

◆ clientPinnedConnectionClosed()

void ConnStateData::clientPinnedConnectionClosed ( const CommCloseCbParams io)

◆ clientPinnedConnectionRead()

void ConnStateData::clientPinnedConnectionRead ( const CommIoCbParams io)

Our read handler called by Comm when the server either closes an idle pinned connection or perhaps unexpectedly sends something on that idle (from Squid p.o.v.) connection.

Definition at line 3892 of file client_side.cc.

References Server::clientConnection, Comm::Connection::close(), CommCommonCbParams::conn, debugs, Pipeline::empty(), Comm::ERR_CLOSING, CommCommonCbParams::flag, handleIdleClientPinnedTlsRead(), Must, NULL, pinning, Server::pipeline, and CommIoCbParams::size.

Referenced by startPinnedConnectionMonitoring().

◆ clientReadFtpData()

void ConnStateData::clientReadFtpData ( const CommIoCbParams io)

◆ clientWriteDone()

void Server::clientWriteDone ( const CommIoCbParams io)

callback handling the Comm::Write completion

Will call afterClientWrite(size_t) to sync the I/O state. Then writeSomeData() to initiate any followup writes that could be immediately done.

Definition at line 193 of file Server.cc.

References Server::afterClientWrite(), Server::clientConnection, CommCommonCbParams::conn, debugs, Comm::ERR_CLOSING, Comm::Connection::fd, CommCommonCbParams::flag, Pipeline::front(), Comm::IsConnOpen(), Must, Server::pipeline, CommIoCbParams::size, Server::writer, and Server::writeSomeData().

Referenced by Server::write().

◆ concurrentRequestQueueFilled()

bool ConnStateData::concurrentRequestQueueFilled ( ) const

Limit the number of concurrent requests.

true when there are available position(s) in the pipeline queue for another request.
false when the pipeline queue is full or disabled.

Definition at line 1780 of file client_side.cc.

References Ssl::bumpSplice, Server::clientConnection, Pipeline::count(), debugs, Server::pipeline, pipelinePrefetchMax(), sslBumpMode, and transparent().

Referenced by clientParseRequests().

◆ connStateClosed()

void ConnStateData::connStateClosed ( const CommCloseCbParams io)

Definition at line 499 of file client_side.cc.

References Server::clientConnection, AsyncJob::deleteThis(), and Comm::Connection::noteClosure().

Referenced by start().

◆ consumeInput()

void ConnStateData::consumeInput ( const size_t  byteCount)

Definition at line 1447 of file client_side.cc.

References assert, SBuf::consume(), debugs, Server::inBuf, and SBuf::length().

Referenced by handleRequestBodyData(), and parseHttpRequest().

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)

◆ doClientRead()

◆ done()

bool AsyncJob::done ( ) const

◆ doneAll()

virtual bool ConnStateData::doneAll ( ) const

Reimplemented from Server.

Definition at line 240 of file client_side.h.

References AsyncJob::doneAll().

◆ doneWithControlMsg()

void ConnStateData::doneWithControlMsg ( )

◆ doPeekAndSpliceStep()

void ConnStateData::doPeekAndSpliceStep ( )

Called when a peek-and-splice step finished. For example after server SSL certificates received and fake server SSL certificates generated

Definition at line 3117 of file client_side.cc.

References assert, BIO_get_data(), Server::clientConnection, clientNegotiateSSL(), COMM_SELECT_WRITE, debugs, Comm::Connection::fd, fd_table, Ssl::ClientBio::hold(), Comm::SetSelect(), and switchedToHttps_.

Referenced by getSslContextStart(), and sslCrtdHandleReply().

◆ endingShutdown()

void ConnStateData::endingShutdown ( )

Called after shutdown_lifetime grace period ends and before stopping the main loop. At least one main loop iteration is guaranteed after this call. Meant for cleanup and state saving that may require other modules.

Reimplemented from RegisteredRunner.

Definition at line 1057 of file client_side.cc.

References Server::clientConnection, Comm::Connection::close(), and Comm::IsConnOpen().

Referenced by startShutdown().

◆ expectNoForwarding()

void ConnStateData::expectNoForwarding ( )

◆ expectRequestBody()

BodyPipe::Pointer ConnStateData::expectRequestBody ( int64_t  size)

Definition at line 3607 of file client_side.cc.

References bodyPipe, BodyPipe::setBodySize(), size, and startDechunkingRequest().

◆ extendLifetime()

void ConnStateData::extendLifetime ( )

◆ fakeAConnectRequest()

bool ConnStateData::fakeAConnectRequest ( const char *  reason,
const SBuf payload 

◆ fillChecklist()

◆ fillConnectionLevelDetails()

void ConnStateData::fillConnectionLevelDetails ( ACLFilledChecklist checklist) const

fillChecklist() obligations not fulfilled by the front request TODO: This is a temporary ACLFilledChecklist::setConn() callback to allow filling checklist using our non-public information sources. It should be removed as unnecessary by making ACLs extract the information they need from the ACLFilledChecklist::conn() without filling/copying.

Definition at line 3580 of file client_side.cc.

References assert, cbdataReference, Server::clientConnection, ACLFilledChecklist::conn(), Comm::Connection::local, ACLFilledChecklist::my_addr, Comm::Connection::remote, ACLFilledChecklist::request, ACLFilledChecklist::rfc931, Comm::Connection::rfc931, ACLFilledChecklist::setIdent(), ACLFilledChecklist::src_addr, ACLFilledChecklist::sslErrors, Ssl::ServerBump::sslErrors(), and sslServerBump.

Referenced by ACLFilledChecklist::setConn().

◆ finalizeConfig()

virtual void RegisteredRunner::finalizeConfig ( )

Called after parsing squid.conf. Meant for setting configuration options that depend on other configuration options and were not explicitly configured.

Reimplemented in MemStoreRr, and sslBumpCfgRr.

Definition at line 47 of file RunnersRegistry.h.

Referenced by SquidMain().

◆ finishDechunkingRequest()

void ConnStateData::finishDechunkingRequest ( bool  withSuccess)

◆ finishShutdown()

virtual void RegisteredRunner::finishShutdown ( )

Definition at line 87 of file RunnersRegistry.h.

Referenced by RunRegistered(), SquidShutdown(), testRock::tearDown(), and watch_child().

◆ getAuth()

const Auth::UserRequest::Pointer& ConnStateData::getAuth ( ) const

Fetch the user details for connection based authentication NOTE: this is ONLY connection based because NTLM and Negotiate is against HTTP spec.

Definition at line 124 of file client_side.h.

References auth_.

Referenced by AuthenticateAcl(), buildFakeRequest(), ClientHttpRequest::calloutsError(), ClientRequestContext::clientAccessCheckDone(), constructHelperQuery(), and ClientRequestContext::hostHeaderVerifyFailed().

◆ getSslContextDone()

◆ getSslContextStart()

◆ getTlsContextFromCache()

Security::ContextPointer ConnStateData::getTlsContextFromCache ( const SBuf cacheKey,
const Ssl::CertificateProperties certProperties 

◆ handleChunkedRequestBody()

◆ handleIdleClientPinnedTlsRead()

bool ConnStateData::handleIdleClientPinnedTlsRead ( )

Handles a ready-for-reading TLS squid-to-server connection that we thought was idle.

false if and only if the connection should be closed.

Definition at line 3851 of file client_side.cc.

References DBG_IMPORTANT, debugs, error(), fd_table, Must, pinning, and startPinnedConnectionMonitoring().

Referenced by clientPinnedConnectionRead().

◆ handleReadData()

bool ConnStateData::handleReadData ( )

called when new request data has been read from the socket

Return values
falsecalled comm_close or setReplyToError (the caller should bail)
truewe did not call comm_close or setReplyToError

Implements Server.

Definition at line 1995 of file client_side.cc.

References bodyPipe, handleRequestBodyData(), and NULL.

◆ handleReply()

virtual void ConnStateData::handleReply ( HttpReply header,
StoreIOBuffer  receivedData 
pure virtual

ClientStream calls this to supply response header (once) and data for the current Http::Stream.

Implemented in Http::One::Server, and Ftp::Server.

Referenced by clientSocketRecipient().

◆ handleRequestBodyData()

bool ConnStateData::handleRequestBodyData ( )

called when new request body data has been buffered in inBuf may close the connection if we were closing and piped everything out

Return values
falsecalled comm_close or setReplyToError (the caller should bail)
truewe did not call comm_close or setReplyToError

Definition at line 2011 of file client_side.cc.

References abortChunkedRequestBody(), assert, bodyParser, bodyPipe, SBuf::c_str(), Server::clientConnection, Comm::Connection::close(), consumeInput(), debugs, error(), handleChunkedRequestBody(), HERE(), Server::inBuf, SBuf::length(), BodyPipe::mayNeedMoreData(), NULL, BodyPipe::putMoreData(), and stoppedSending().

Referenced by handleReadData().

◆ handleSslBumpHandshakeError()

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )

Definition at line 71 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ hasNotes()

bool ConnStateData::hasNotes ( ) const

Definition at line 359 of file client_side.h.

References NotePairs::empty(), and theNotes.

◆ httpsPeeked()

◆ idleTimeout()

virtual time_t ConnStateData::idleTimeout ( ) const
protectedpure virtual

Implemented in Ftp::Server, and Http::One::Server.

Referenced by readNextRequest().

◆ initiateTunneledRequest()

◆ isOpen()

◆ kick()

void ConnStateData::kick ( )
We are done with the response, and we are either still receiving request body (early response!) or have already stopped receiving anything.

If we are still receiving, then clientParseRequest() below will fail. (XXX: but then we will call readNextRequest() which may succeed and execute a smuggled request as we are not done with the current request).

If we stopped because we got everything, then try the next request.

If we stopped receiving because of an error, then close now to avoid getting stuck and to prevent accidental request smuggling.

Attempt to parse a request from the request buffer. If we've been fed a pipelined request it may already be in our read buffer.
This needs to fall through - if we're unlucky and parse the last request from our read buffer we may never re-register for another client read.
Either we need to kick-start another read or, if we have a half-closed connection, kill it after the last request. This saves waiting for half-closed connections to finished being half-closed AND then, sometimes, spending "Timeout" time in the keepalive "Waiting for next request" state.
At this point we either have a parsed request (which we've kicked off the processing for) or not. If we have a deferred request (parsed but deferred for pipeling processing reasons) then look at processing it. If not, simply kickstart another read.

Definition at line 910 of file client_side.cc.

References Server::clientConnection, clientParseRequests(), ClientSocketContextPushDeferredIfNeeded(), Comm::Connection::close(), commIsHalfClosed(), DBG_IMPORTANT, debugs, Pipeline::empty(), Comm::Connection::fd, flags, Pipeline::front(), Comm::IsConnOpen(), MYNAME, pinning, Server::pipeline, readNextRequest(), and stoppedReceiving().

Referenced by notePinnedConnectionBecameIdle(), and Http::Stream::writeComplete().

◆ lifetimeTimeout()

void ConnStateData::lifetimeTimeout ( const CommTimeoutCbParams params)

◆ maybeMakeSpaceAvailable()

void Server::maybeMakeSpaceAvailable ( )

Prepare inBuf for I/O. This method balances several conflicting desires:

  1. Do not read too few bytes at a time.
  2. Do not waste too much buffer space.
  3. Do not [re]allocate or memmove the buffer too much.
  4. Obey Config.maxRequestBufferSize limit.

Definition at line 74 of file Server.cc.

References SBufReservationRequirements::allowShared, CLIENT_REQ_BUF_SZ, Config, debugs, SBufReservationRequirements::idealSpace, Server::inBuf, SBufReservationRequirements::maxCapacity, SquidConfig::maxRequestBufferSize, SBufReservationRequirements::minSpace, SBuf::reserve(), and SBuf::spaceSize().

Referenced by Server::doClientRead().

◆ mayNeedToReadMoreBody()

int64_t ConnStateData::mayNeedToReadMoreBody ( ) const

number of body bytes we need to comm_read for the "current" request

Return values
0We do not need to read any [more] body bytes
negativeMay need more but do not know how many; could be zero!
positiveNeed to read exactly that many more body bytes

Definition at line 3618 of file client_side.cc.

References bodyPipe, BodyPipe::bodySizeKnown(), Server::inBuf, SBuf::length(), and BodyPipe::unproducedSize().

Referenced by clientAfterReadingRequests(), and stopSending().

◆ mustStop()

◆ noteBodyConsumerAborted()

void ConnStateData::noteBodyConsumerAborted ( BodyPipe::Pointer  )
pure virtual

◆ noteMoreBodySpaceAvailable()

virtual void ConnStateData::noteMoreBodySpaceAvailable ( BodyPipe::Pointer  )
pure virtual

Implements BodyProducer.

Implemented in Ftp::Server, and Http::One::Server.

◆ notePeerConnection()

virtual void ConnStateData::notePeerConnection ( Comm::ConnectionPointer  )

Reimplemented in Ftp::Server.

Definition at line 208 of file client_side.h.

Referenced by FwdState::successfullyConnectedToPeer().

◆ notePinnedConnectionBecameIdle()

◆ notes()

NotePairs::Pointer ConnStateData::notes ( )
existing non-empty connection annotations, creates and returns empty annotations otherwise

Definition at line 4089 of file client_side.cc.

References theNotes.

Referenced by UpdateRequestNotes().

◆ noteTakeServerConnectionControl()

virtual void ConnStateData::noteTakeServerConnectionControl ( ServerConnectionContext  )

Gives us the control of the Squid-to-server connection. Used, for example, to initiate a TCP tunnel after protocol switching.

Reimplemented in Http::One::Server.

Definition at line 230 of file client_side.h.

Referenced by HttpStateData::proceedAfter1xx().

◆ parseHttpRequest()

Http::Stream * ConnStateData::parseHttpRequest ( const Http1::RequestParserPointer hp)

◆ parseOneRequest()

virtual Http::Stream* ConnStateData::parseOneRequest ( )
protectedpure virtual

parse input buffer prefix into a single transfer protocol request return NULL to request more header bytes (after checking any limits) use abortRequestParsing() to handle parsing errors w/o creating request

Implemented in Ftp::Server, and Http::One::Server.

Referenced by clientParseRequests().

◆ parseProxyProtocolHeader()

bool ConnStateData::parseProxyProtocolHeader ( )

Attempts to extract a PROXY protocol header from the input buffer and, upon success, stores the parsed header in proxyProtocolHeader_.

true if the header was successfully parsed
false if more data is needed to parse the header or on error

Definition at line 1849 of file client_side.cc.

References assert, Server::clientConnection, COMM_TRANSPARENT, SBuf::consume(), debugs, Comm::Connection::flags, Server::inBuf, SBuf::length(), Comm::Connection::local, needProxyProtocolHeader_, ProxyProtocol::Parse(), proxyProtocolError(), proxyProtocolHeader_, and Comm::Connection::remote.

Referenced by clientParseRequests().

◆ parseTlsHandshake()

◆ pinBusyConnection()

void ConnStateData::pinBusyConnection ( const Comm::ConnectionPointer pinServerConn,
const HttpRequest::Pointer request 

Forward future client requests using the given to-server connection. The connection is still being used by the current client request.

Definition at line 3763 of file client_side.cc.

References pinConnection(), and request().

◆ pinConnection()

◆ pinnedAuth()

bool ConnStateData::pinnedAuth ( ) const

Definition at line 205 of file client_side.h.

References pinning.

◆ pinnedPeer()

CachePeer* ConnStateData::pinnedPeer ( ) const
the pinned CachePeer if one exists, nil otherwise

Definition at line 204 of file client_side.h.

References pinning.

Referenced by PeerSelector::selectPinned().

◆ pipelinePrefetchMax()

int ConnStateData::pipelinePrefetchMax ( ) const

◆ postHttpsAccept()

◆ prepareTlsSwitchingURL()

◆ processParsedRequest()

virtual void ConnStateData::processParsedRequest ( Http::StreamPointer )
protectedpure virtual

Implemented in Ftp::Server, and Http::One::Server.

Referenced by clientParseRequests().

◆ proxyProtocolError()

bool ConnStateData::proxyProtocolError ( const char *  msg)

Perform cleanup on PROXY protocol errors. If header parsing hits a fatal error terminate the connection, otherwise wait for more data.

Definition at line 1828 of file client_side.cc.

References Server::clientConnection, DBG_IMPORTANT, debugs, and AsyncJob::mustStop().

Referenced by parseProxyProtocolHeader(), and proxyProtocolValidateClient().

◆ proxyProtocolHeader()

const ProxyProtocol::HeaderPointer& ConnStateData::proxyProtocolHeader ( ) const

Definition at line 361 of file client_side.h.

References proxyProtocolHeader_.

Referenced by ClientHttpRequest::ClientHttpRequest().

◆ proxyProtocolValidateClient()

bool ConnStateData::proxyProtocolValidateClient ( )

Perform proxy_protocol_access ACL tests on the client which connected to PROXY protocol port to see if we trust the sender enough to accept their PROXY header claim.

Definition at line 1809 of file client_side.cc.

References SquidConfig::accessList, Acl::Answer::allowed(), Config, ACLChecklist::fastCheck(), fillChecklist(), SquidConfig::proxyProtocol, and proxyProtocolError().

Referenced by start().

◆ quitAfterError()

void ConnStateData::quitAfterError ( HttpRequest request)

Changes state so that we close the connection and quit after serving the client-side-detected error response instead of getting stuck.

Definition at line 1469 of file client_side.cc.

References Server::clientConnection, debugs, flags, HERE(), and request().

Referenced by serveDelayedError().

◆ reading()

bool Server::reading ( ) const

Definition at line 58 of file Server.h.

References NULL, and Server::reader.

Referenced by Server::doClientRead(), Server::readSomeData(), and Server::stopReading().

◆ readNextRequest()

void ConnStateData::readNextRequest ( )

Set the timeout BEFORE calling readSomeData().

Please don't do anything with the FD past here!

Definition at line 873 of file client_side.cc.

References Server::clientConnection, debugs, Comm::Connection::fd, fd_note(), HERE(), idleTimeout(), Server::readSomeData(), resetReadTimeout(), and Comm::Connection::timeLeft().

Referenced by kick().

◆ readSomeData()

◆ receivedFirstByte()

void ConnStateData::receivedFirstByte ( )

◆ registerRunner()

void IndependentRunner::registerRunner ( )

◆ requestTimeout()

◆ resetReadTimeout()

void ConnStateData::resetReadTimeout ( time_t  timeout)

◆ resetSslCommonName()

void ConnStateData::resetSslCommonName ( const char *  name)

Definition at line 294 of file client_side.h.

References sslCommonName_.

Referenced by parseTlsHandshake(), and switchToHttps().

◆ sendControlMsg()

◆ serveDelayedError()

◆ serverBump()

◆ setAuth()

void ConnStateData::setAuth ( const Auth::UserRequest::Pointer aur,
const char *  cause 

Set the user details for connection-based authentication to use from now until connection closure.

Any change to existing credentials shows that something invalid has happened. Such as:

  • NTLM/Negotiate auth was violated by the per-request headers missing a revalidation token
  • NTLM/Negotiate auth was violated by the per-request headers being for another user
  • SSL-Bump CONNECT tunnel with persistent credentials has ended

Definition at line 510 of file client_side.cc.

References auth_, Server::clientConnection, comm_reset_close(), debugs, NULL, Auth::UserRequest::releaseAuthServer(), and stopReceiving().

Referenced by ProxyAuthLookup::LookupDone(), ClientHttpRequest::sslBumpEstablish(), and swanSong().

◆ setServerBump()

void ConnStateData::setServerBump ( Ssl::ServerBump srvBump)

Definition at line 287 of file client_side.h.

References assert, and sslServerBump.

Referenced by ClientHttpRequest::doCallouts().

◆ shouldCloseOnEof()

bool ConnStateData::shouldCloseOnEof ( ) const

◆ shouldPreserveClientData()

bool ConnStateData::shouldPreserveClientData ( ) const

whether we should start saving inBuf client bytes in anticipation of tunneling them to the server later (on_unsupported_protocol)

Definition at line 4057 of file client_side.cc.

References SquidConfig::accessList, Config, needProxyProtocolHeader_, Pipeline::nrequests, SquidConfig::on_unsupported_protocol, parsedBumpedRequestCount, parsingTlsHandshake, Server::pipeline, port, AnyP::PROTO_FTP, switchedToHttps(), and transparent().

Referenced by start(), and switchToHttps().

◆ splice()

◆ sslCommonName()

const SBuf& ConnStateData::sslCommonName ( ) const

Definition at line 293 of file client_side.h.

References sslCommonName_.

◆ sslCrtdHandleReply()

◆ sslCrtdHandleReplyWrapper()

void ConnStateData::sslCrtdHandleReplyWrapper ( void *  data,
const Helper::Reply reply 

Definition at line 2582 of file client_side.cc.

References sslCrtdHandleReply().

Referenced by getSslContextStart().

◆ start()

◆ Start()

◆ startDechunkingRequest()

void ConnStateData::startDechunkingRequest ( )

Definition at line 3666 of file client_side.cc.

References assert, bodyParser, bodyPipe, debugs, HERE(), Must, NULL, and BodyPipe::status().

Referenced by expectRequestBody().

◆ startPeekAndSplice()

◆ startPinnedConnectionMonitoring()

void ConnStateData::startPinnedConnectionMonitoring ( )

[re]start monitoring pinned connection for peer closures so that we can propagate them to an idle client pinned to that peer

Definition at line 3829 of file client_side.cc.

References clientPinnedConnectionRead(), JobCallback, NULL, pinning, and Comm::Read().

Referenced by handleIdleClientPinnedTlsRead(), and notePinnedConnectionBecameIdle().

◆ startReconfigure()

virtual void RegisteredRunner::startReconfigure ( )

Called after receiving a reconfigure request and before parsing squid.conf. Meant for modules that need to prepare for their configuration being changed [outside their control]. The changes end with the syncConfig() event.

Reimplemented in Dns::ConfigRr.

Definition at line 63 of file RunnersRegistry.h.

Referenced by mainReconfigureStart().

◆ startShutdown()

void ConnStateData::startShutdown ( )

Called after receiving a shutdown request and before stopping the main loop. At least one main loop iteration is guaranteed after this call. Meant for cleanup and state saving that may require other modules.

Reimplemented from RegisteredRunner.

Definition at line 1046 of file client_side.cc.

References Pipeline::empty(), endingShutdown(), and Server::pipeline.

◆ status()

◆ stoppedReceiving()

const char* ConnStateData::stoppedReceiving ( ) const

Definition at line 160 of file client_side.h.

References stoppedReceiving_.

Referenced by kick(), stopReceiving(), and stopSending().

◆ stoppedSending()

const char* ConnStateData::stoppedSending ( ) const

Definition at line 162 of file client_side.h.

References stoppedSending_.

Referenced by handleRequestBodyData(), stopReceiving(), and stopSending().

◆ stopPinnedConnectionMonitoring()

void ConnStateData::stopPinnedConnectionMonitoring ( )

Definition at line 3841 of file client_side.cc.

References NULL, pinning, and Comm::ReadCancel().

Referenced by borrowPinnedConnection(), and unpinConnection().

◆ stopProducingFor()

void BodyProducer::stopProducingFor ( RefCount< BodyPipe > &  p,
bool  atEof 

◆ stopReading()

void Server::stopReading ( )

◆ stopReceiving()

void ConnStateData::stopReceiving ( const char *  error)

◆ stopSending()

◆ storeTlsContextToCache()

void ConnStateData::storeTlsContextToCache ( const SBuf cacheKey,
Security::ContextPointer ctx 

Attempts to add a given TLS context to the cache, replacing the old same-key context, if any

Definition at line 2726 of file client_side.cc.

References ClpMap< Key, Value, MemoryUsedBy >::add(), Server::clientConnection, Comm::Connection::fd, fd_table, Ssl::GlobalContextStorage::getLocalStorage(), port, and Ssl::TheGlobalContextStorage.

Referenced by getSslContextStart(), and sslCrtdHandleReply().

◆ swanSong()

void ConnStateData::swanSong ( )

◆ switchedToHttps()

bool ConnStateData::switchedToHttps ( ) const

◆ switchToHttps()

◆ syncConfig()

virtual void RegisteredRunner::syncConfig ( )

Called after parsing squid.conf during reconfiguration. Meant for adjusting the module state based on configuration changes.

Reimplemented in Auth::CredentialCacheRr, and PeerPoolMgrsRr.

Definition at line 67 of file RunnersRegistry.h.

Referenced by mainReconfigureFinish().

◆ terminateAll()

◆ tlsClientSni()

const SBuf& ConnStateData::tlsClientSni ( ) const

Definition at line 295 of file client_side.h.

References tlsClientSni_.

Referenced by prepareTlsSwitchingURL().

◆ toCbdata()

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

◆ transparent()

◆ tunnelOnError()

◆ unpinConnection()

◆ unregisterRunner()

void IndependentRunner::unregisterRunner ( )

Definition at line 96 of file RunnersRegistry.cc.

References FindRunners().

Referenced by IndependentRunner::~IndependentRunner().

◆ updateError() [1/2]

void ConnStateData::updateError ( const err_type  c,
const ErrorDetailPointer d 

Definition at line 367 of file client_side.h.

References Helper::Error, and updateError().

Referenced by updateError().

◆ updateError() [2/2]

◆ useConfig()

virtual void RegisteredRunner::useConfig ( )

Called after claimMemoryNeeds(). Meant for activating modules and features using a finalized configuration with known memory requirements.

Reimplemented in TransientsRr, SharedSessionCacheRr, PeerPoolMgrsRr, MemStoreRr, Ipc::Mem::RegisteredRunner, SharedMemPagesRr, and ClientDbRr.

Definition at line 56 of file RunnersRegistry.h.

Referenced by RunConfigUsers().

◆ whenClientIpKnown()

◆ write() [1/2]

void Server::write ( char *  buf,
int  len 

◆ write() [2/2]

void Server::write ( MemBuf mb)

◆ writeControlMsgAndCall()

virtual bool ConnStateData::writeControlMsgAndCall ( HttpReply rep,
AsyncCall::Pointer call 
pure virtual

Implemented in Ftp::Server, and Http::One::Server.

Referenced by sendControlMsg().

◆ writeSomeData()

virtual void Server::writeSomeData ( )

Definition at line 67 of file Server.h.

Referenced by Server::clientWriteDone().

◆ writing()

bool Server::writing ( ) const

Definition at line 87 of file Server.h.

References NULL, and Server::writer.

◆ wroteControlMsg()

void HttpControlMsgSink::wroteControlMsg ( const CommIoCbParams params)

Member Data Documentation

◆ auth

bool ConnStateData::auth = false

Definition at line 148 of file client_side.h.

Referenced by clientCheckPinning().

◆ auth_

Auth::UserRequest::Pointer ConnStateData::auth_

Definition at line 474 of file client_side.h.

Referenced by getAuth(), and setAuth().

◆ bareError

Error ConnStateData::bareError

◆ bodyParser

◆ bodyPipe

◆ cbControlMsgSent

AsyncCall::Pointer HttpControlMsgSink::cbControlMsgSent

◆ clientConnection

Comm::ConnectionPointer Server::clientConnection

Definition at line 98 of file Server.h.

Referenced by ClientHttpRequest::ClientHttpRequest(), Server::Server(), TunnelStateData::TunnelStateData(), ~ConnStateData(), abortChunkedRequestBody(), abortRequestParsing(), acceptTls(), afterClientRead(), Format::Format::assemble(), buildFakeRequest(), IdentLookup::checkForAsync(), clientAfterReadingRequests(), clientParseRequests(), clientPinnedConnectionClosed(), clientPinnedConnectionRead(), ClientRequestContext::clientRedirectDone(), clientSocketRecipient(), Server::clientWriteDone(), concurrentRequestQueueFilled(), connStateClosed(), Server::doClientRead(), Server::doneAll(), doneWithControlMsg(), doPeekAndSpliceStep(), endingShutdown(), extendLifetime(), fakeAConnectRequest(), fillConnectionLevelDetails(), getSslContextDone(), getSslContextStart(), handleChunkedRequestBody(), handleRequestBodyData(), handleSslBumpHandshakeError(), ClientRequestContext::hostHeaderIpVerify(), ClientRequestContext::hostHeaderVerify(), ClientRequestContext::hostHeaderVerifyFailed(), httpsCreate(), httpsEstablish(), httpsSslBumpAccessCheckDone(), httpsSslBumpStep2AccessCheckDone(), initiateTunneledRequest(), isOpen(), kick(), IdentLookup::LookupDone(), HttpRequest::manager(), ACLIdent::match(), ClientHttpRequest::noteAdaptationAclCheckDone(), ClientHttpRequest::noteBodyProducerAborted(), parseHttpRequest(), parseProxyProtocolHeader(), parseTlsHandshake(), pinConnection(), postHttpsAccept(), clientReplyContext::processExpired(), clientReplyContext::processMiss(), proxyProtocolError(), quitAfterError(), readNextRequest(), Server::readSomeData(), resetReadTimeout(), PeerSelector::resolveSelected(), sendControlMsg(), serveDelayedError(), setAuth(), splice(), ClientRequestContext::sslBumpAccessCheckDone(), ClientHttpRequest::sslBumpEstablish(), ClientHttpRequest::sslBumpStart(), sslCrtdHandleReply(), start(), startPeekAndSplice(), Server::stopReading(), stopReceiving(), stopSending(), storeTlsContextToCache(), swanSong(), Server::swanSong(), switchToHttps(), terminateAll(), transparent(), tunnelOnError(), tunnelStart(), whenClientIpKnown(), and Server::write().

◆ closeHandler

AsyncCall::Pointer ConnStateData::closeHandler

Definition at line 154 of file client_side.h.

◆ flags

◆ host

char* ConnStateData::host = nullptr

Definition at line 145 of file client_side.h.

◆ id

const InstanceId<AsyncJob> AsyncJob::id

Definition at line 73 of file AsyncJob.h.

◆ inBuf

◆ inCall

AsyncCall::Pointer AsyncJob::inCall

◆ keyLogger

Security::KeyLogger ConnStateData::keyLogger

Definition at line 385 of file client_side.h.

Referenced by acceptTls().

◆ log_addr

Ip::Address ConnStateData::log_addr

◆ needProxyProtocolHeader_

bool ConnStateData::needProxyProtocolHeader_ = false

◆ parsedBumpedRequestCount

uint64_t ConnStateData::parsedBumpedRequestCount = 0

Definition at line 481 of file client_side.h.

Referenced by clientParseRequests(), and shouldPreserveClientData().

◆ parsingTlsHandshake

bool ConnStateData::parsingTlsHandshake = false

whether we are getting/parsing TLS Hello bytes

Definition at line 479 of file client_side.h.

Referenced by afterClientRead(), parseTlsHandshake(), shouldPreserveClientData(), switchToHttps(), and terminateAll().

◆ peer

CachePeer* ConnStateData::peer = nullptr

Definition at line 152 of file client_side.h.

◆ peerAccessDenied

bool ConnStateData::peerAccessDenied = false

Definition at line 151 of file client_side.h.

Referenced by PeerSelector::selectPinned().

◆ pinned

bool ConnStateData::pinned = false

Definition at line 147 of file client_side.h.

Referenced by HttpRequest::pinnedConnection().

◆ pinning

◆ pipeline

◆ port

◆ preservedClientData

SBuf ConnStateData::preservedClientData

From-client handshake bytes (including bytes at the beginning of a CONNECT tunnel) which we may need to forward as-is if their syntax does not match the expected TLS or HTTP protocol (on_unsupported_protocol).

Definition at line 350 of file client_side.h.

Referenced by Format::Format::assemble(), parseHttpRequest(), parseTlsHandshake(), splice(), and tunnelOnError().

◆ preservingClientData_

bool ConnStateData::preservingClientData_ = false

◆ proxyProtocolHeader_

ProxyProtocol::HeaderPointer ConnStateData::proxyProtocolHeader_

Definition at line 470 of file client_side.h.

Referenced by parseProxyProtocolHeader(), postHttpsAccept(), and proxyProtocolHeader().

◆ reader

AsyncCall::Pointer Server::reader

◆ readHandler

AsyncCall::Pointer ConnStateData::readHandler

Definition at line 153 of file client_side.h.

◆ reading

bool ConnStateData::reading = false

Definition at line 149 of file client_side.h.

◆ readMore

bool ConnStateData::readMore = true

Definition at line 140 of file client_side.h.

Referenced by ClientHttpRequest::doCallouts().

◆ receivedFirstByte_

bool Server::receivedFirstByte_

Definition at line 113 of file Server.h.

Referenced by Server::doClientRead(), receivedFirstByte(), requestTimeout(), and switchToHttps().

◆ serverConnection

Comm::ConnectionPointer ConnStateData::serverConnection

Definition at line 144 of file client_side.h.

Referenced by clientCheckPinning().

◆ signAlgorithm

Ssl::CertSignAlgorithm ConnStateData::signAlgorithm = Ssl::algSignTrusted

◆ sslBumpCertKey

SBuf ConnStateData::sslBumpCertKey

Definition at line 490 of file client_side.h.

Referenced by getSslContextStart(), and sslCrtdHandleReply().

◆ sslBumpMode

◆ sslCommonName_

SBuf ConnStateData::sslCommonName_

Definition at line 486 of file client_side.h.

Referenced by buildSslCertGenerationParams(), resetSslCommonName(), and sslCommonName().

◆ sslServerBump

◆ started_

bool AsyncJob::started_ = false

Definition at line 83 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().

◆ stoppedReceiving_

const char* ConnStateData::stoppedReceiving_ = nullptr

Definition at line 500 of file client_side.h.

Referenced by stoppedReceiving(), stopReceiving(), and stopSending().

◆ stoppedSending_

const char* ConnStateData::stoppedSending_ = nullptr

Definition at line 498 of file client_side.h.

Referenced by stoppedSending(), stopReceiving(), and stopSending().

◆ stopReason

const char* AsyncJob::stopReason

◆ swanSang

bool ConnStateData::swanSang = false

Definition at line 141 of file client_side.h.

◆ swanSang_

bool AsyncJob::swanSang_ = false

Definition at line 84 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().

◆ switchedToHttps_

bool ConnStateData::switchedToHttps_ = false

◆ theNotes

NotePairs::Pointer ConnStateData::theNotes

Connection annotations, clt_conn_tag and other tags are stored here. If set, are propagated to the current and all future master transactions on the connection.

Definition at line 504 of file client_side.h.

Referenced by hasNotes(), and notes().

◆ tlsClientSni_

SBuf ConnStateData::tlsClientSni_

Definition at line 489 of file client_side.h.

Referenced by fakeAConnectRequest(), parseTlsHandshake(), and tlsClientSni().

◆ tlsConnectHostOrIp

SBuf ConnStateData::tlsConnectHostOrIp

The TLS server host name as passed in the CONNECT request

Definition at line 484 of file client_side.h.

Referenced by buildSslCertGenerationParams(), getSslContextDone(), httpsPeeked(), initiateTunneledRequest(), prepareTlsSwitchingURL(), sslCrtdHandleReply(), and switchToHttps().

◆ tlsConnectPort

unsigned short ConnStateData::tlsConnectPort = 0

Definition at line 485 of file client_side.h.

Referenced by initiateTunneledRequest(), prepareTlsSwitchingURL(), and switchToHttps().

◆ tlsParser

Security::HandshakeParser ConnStateData::tlsParser

Tls parser to use for client HELLO messages parsing on bumped connections.

Definition at line 309 of file client_side.h.

Referenced by parseTlsHandshake().

◆ transferProtocol

AnyP::ProtocolVersion Server::transferProtocol

The transfer protocol currently being spoken on this connection. HTTP/1.x CONNECT, HTTP/1.1 Upgrade and HTTP/2 SETTINGS offer the ability to change protocols on the fly.

Definition at line 105 of file Server.h.

Referenced by parseHttpRequest(), prepareTlsSwitchingURL(), splice(), and switchToHttps().

◆ typeName

◆ writer

AsyncCall::Pointer Server::writer

Definition at line 126 of file Server.h.

Referenced by Server::clientWriteDone(), Server::write(), and Server::writing().

◆ zeroReply

bool ConnStateData::zeroReply = false

Definition at line 150 of file client_side.h.

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






Web Site Translations