HttpTunneler.cc
Go to the documentation of this file.
29Http::Tunneler::Tunneler(const Comm::ConnectionPointer &conn, const HttpRequest::Pointer &req, const AsyncCallback<Answer> &aCallback, const time_t timeout, const AccessLogEntryPointer &alp):
426 bailWith(new ErrorState(ERR_GATEWAY_FAILURE, Http::scInternalServerError, request.getRaw(), al));
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:69
void NoteOutgoingConnectionFailure(CachePeer *const peer, const Http::StatusCode code)
Definition: CachePeer.h:243
PconnPool * fwdPconnPool
a collection of previously used persistent Squid-to-peer HTTP(S) connections
Definition: FwdState.cc:78
CBDATA_NAMESPACED_CLASS_INIT(Http, Tunneler)
void error(char *format,...)
a smart AsyncCall pointer for delivery of future results
Definition: AsyncCallbacks.h:32
Definition: AsyncJob.h:32
Definition: CommCalls.h:166
Definition: CommCalls.h:128
Definition: CommCalls.h:114
Definition: CommCalls.h:134
Definition: errorpage.h:89
Definition: HttpHeader.h:75
void packInto(Packable *p, bool mask_sensitive_info=false) const
Definition: HttpHeader.cc:540
Definition: HttpReply.h:25
static void httpBuildRequestHeader(HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &al, HttpHeader *hdr_out, const Http::StateFlags &flags)
Definition: http.cc:1835
Definition: ResponseParser.h:30
bool parse(const SBuf &aBuf) override
Definition: ResponseParser.cc:198
Definition: StateFlags.h:16
bool peering
Whether the next TCP hop is a cache_peer, including originserver.
Definition: StateFlags.h:40
void set(const AnyP::ProtocolVersion &newVersion, Http::StatusCode newStatus, const char *newReason=nullptr)
Definition: StatusLine.cc:35
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
void bailOnResponseError(const char *error, HttpReply *)
Definition: HttpTunneler.cc:336
void handleResponse(const bool eof)
Parses [possibly incomplete] CONNECT response and reacts to it.
Definition: HttpTunneler.cc:274
void callBack()
a bailWith(), sendSuccess() helper: sends results to the initiator
Definition: HttpTunneler.cc:409
const char * status() const override
internal cleanup; do not call directly
Definition: HttpTunneler.cc:433
void handleConnectionClosure(const CommCloseCbParams &)
Definition: HttpTunneler.cc:89
void handleWrittenRequest(const CommIoCbParams &)
Called when we are done writing a CONNECT request header to a peer.
Definition: HttpTunneler.cc:176
void watchForClosures()
make sure we quit if/when the connection is gone
Definition: HttpTunneler.cc:102
Tunneler(const Comm::ConnectionPointer &, const HttpRequestPointer &, const AsyncCallback< Answer > &, time_t timeout, const AccessLogEntryPointer &)
Definition: HttpTunneler.cc:29
void handleTimeout(const CommTimeoutCbParams &)
The connection read timeout callback handler.
Definition: HttpTunneler.cc:117
void handleReadyRead(const CommIoCbParams &)
Called when we read [a part of] CONNECT response from the peer.
Definition: HttpTunneler.cc:201
void countFailingConnection(const ErrorState *)
updates connection usage history before the connection is closed
Definition: HttpTunneler.cc:377
Definition: MemBuf.h:24
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
Raw & minLevel(const int aLevel)
limit data printing to at least the given debugging level
Definition: Raw.h:27
struct StatCounters::@123::@133 all
struct StatCounters::@123::@133 other
struct StatCounters::@123 server
int commSetConnTimeout(const Comm::ConnectionPointer &conn, time_t timeout, AsyncCall::Pointer &callback)
Definition: comm.cc:595
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:949
void comm_remove_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:978
int commUnsetConnTimeout(const Comm::ConnectionPointer &conn)
Definition: comm.cc:621
void ReadCancel(int fd, AsyncCall::Pointer &callback)
Cancel the read pending on FD. No action if none pending.
Definition: Read.cc:219
void Read(const Comm::ConnectionPointer &conn, AsyncCall::Pointer &callback)
Definition: Read.cc:40
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
Definition: Write.cc:33
time_t MortalReadTimeout(const time_t startTime, const time_t lifetimeLimit)
maximum read delay for readers with limited lifetime
Definition: Read.cc:248
Definition: forward.h:18
void Controller::create() STUB void Controller Controller nil
Definition: stub_libstore.cc:19