HttpTunneler.cc
Go to the documentation of this file.
29 Http::Tunneler::Tunneler(const Comm::ConnectionPointer &conn, const HttpRequest::Pointer &req, AsyncCall::Pointer &aCallback, time_t timeout, const AccessLogEntryPointer &alp):
442 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
PconnPool * fwdPconnPool
a collection of previously used persistent Squid-to-peer HTTP(S) connections
Definition: FwdState.cc:77
CBDATA_NAMESPACED_CLASS_INIT(Http, Tunneler)
void error(char *format,...)
virtual CallDialer * getDialer()=0
Definition: AsyncJob.h:32
Definition: CommCalls.h:181
Definition: CommCalls.h:133
Definition: CommCalls.h:119
Definition: CommCalls.h:139
Definition: errorpage.h:87
Definition: HttpHeader.h:72
void packInto(Packable *p, bool mask_sensitive_info=false) const
Definition: HttpHeader.cc:568
Definition: HttpReply.h:25
static void httpBuildRequestHeader(HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &al, HttpHeader *hdr_out, const Http::StateFlags &flags)
Definition: http.cc:1825
Definition: ResponseParser.h:30
virtual bool parse(const SBuf &aBuf)
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=NULL)
Definition: StatusLine.cc:35
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
Definition: HttpTunnelerAnswer.h:30
void countFailingConnection()
updates connection usage history before the connection is closed
Definition: HttpTunneler.cc:390
void bailOnResponseError(const char *error, HttpReply *)
Definition: HttpTunneler.cc:349
void handleResponse(const bool eof)
Parses [possibly incomplete] CONNECT response and reacts to it.
Definition: HttpTunneler.cc:287
void callBack()
a bailWith(), sendSuccess() helper: sends results to the initiator
Definition: HttpTunneler.cc:423
void handleConnectionClosure(const CommCloseCbParams &)
Definition: HttpTunneler.cc:102
virtual const char * status() const
internal cleanup; do not call directly
Definition: HttpTunneler.cc:449
void handleWrittenRequest(const CommIoCbParams &)
Called when we are done writing a CONNECT request header to a peer.
Definition: HttpTunneler.cc:189
void watchForClosures()
make sure we quit if/when the connection is gone
Definition: HttpTunneler.cc:115
Tunneler(const Comm::ConnectionPointer &conn, const HttpRequestPointer &req, AsyncCall::Pointer &aCallback, time_t timeout, const AccessLogEntryPointer &alp)
Definition: HttpTunneler.cc:29
void handleTimeout(const CommTimeoutCbParams &)
The connection read timeout callback handler.
Definition: HttpTunneler.cc:130
TunnelerAnswer & answer()
convenience method to get to the answer fields
Definition: HttpTunneler.cc:64
void handleReadyRead(const CommIoCbParams &)
Called when we read [a part of] CONNECT response from the peer.
Definition: HttpTunneler.cc:214
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::@128 server
struct StatCounters::@128::@138 all
struct StatCounters::@128::@138 other
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:921
void comm_remove_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:950
int commSetConnTimeout(const Comm::ConnectionPointer &conn, int timeout, AsyncCall::Pointer &callback)
Definition: comm.cc:563
int commUnsetConnTimeout(const Comm::ConnectionPointer &conn)
Definition: comm.cc:589
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:22
void Controller::create() STUB void Controller Controller nil
Definition: stub_libstore.cc:19