HttpTunneler.cc
Go to the documentation of this file.
29 Http::Tunneler::Tunneler(const Comm::ConnectionPointer &conn, const HttpRequest::Pointer &req, const AsyncCallback<Answer> &aCallback, const time_t timeout, const AccessLogEntryPointer &alp):
433 bailWith(new ErrorState(ERR_GATEWAY_FAILURE, Http::scInternalServerError, request.getRaw(), al));
void Read(const Comm::ConnectionPointer &conn, AsyncCall::Pointer &callback)
Definition: Read.cc:40
Definition: AsyncJob.h:31
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:952
void commUnsetConnTimeout(const Comm::ConnectionPointer &conn)
Definition: comm.cc:616
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
struct StatCounters::@112::@122 all
void handleTimeout(const CommTimeoutCbParams &)
The connection read timeout callback handler.
Definition: HttpTunneler.cc:117
void error(char *format,...)
a smart AsyncCall pointer for delivery of future results
Definition: AsyncCallbacks.h:31
bool peering
Whether the next TCP hop is a cache_peer, including originserver.
Definition: StateFlags.h:40
void countFailingConnection()
updates connection usage history before the connection is closed
Definition: HttpTunneler.cc:382
PconnPool * fwdPconnPool
a collection of previously used persistent Squid-to-peer HTTP(S) connections
Definition: FwdState.cc:78
struct StatCounters::@112 server
Definition: forward.h:17
const char * status() const override
internal cleanup; do not call directly
Definition: HttpTunneler.cc:440
Definition: StateFlags.h:15
bool parse(const SBuf &aBuf) override
Definition: ResponseParser.cc:198
void bailOnResponseError(const char *error, HttpReply *)
Definition: HttpTunneler.cc:341
void handleReadyRead(const CommIoCbParams &)
Called when we read [a part of] CONNECT response from the peer.
Definition: HttpTunneler.cc:201
void ReadCancel(int fd, AsyncCall::Pointer &callback)
Cancel the read pending on FD. No action if none pending.
Definition: Read.cc:219
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
Definition: MemBuf.h:23
Definition: CommCalls.h:113
void set(const AnyP::ProtocolVersion &newVersion, Http::StatusCode newStatus, const char *newReason=nullptr)
Definition: StatusLine.cc:35
void handleResponse(const bool eof)
Parses [possibly incomplete] CONNECT response and reacts to it.
Definition: HttpTunneler.cc:274
Tunneler(const Comm::ConnectionPointer &, const HttpRequestPointer &, const AsyncCallback< Answer > &, time_t timeout, const AccessLogEntryPointer &)
Definition: HttpTunneler.cc:29
struct StatCounters::@112::@122 other
Definition: CommCalls.h:165
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:70
Definition: ResponseParser.h:29
void packInto(Packable *p, bool mask_sensitive_info=false) const
Definition: HttpHeader.cc:539
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
Definition: Write.cc:33
void handleConnectionClosure(const CommCloseCbParams &)
Definition: HttpTunneler.cc:89
Definition: HttpReply.h:24
void callBack()
a bailWith(), sendSuccess() helper: sends results to the initiator
Definition: HttpTunneler.cc:416
void handleWrittenRequest(const CommIoCbParams &)
Called when we are done writing a CONNECT request header to a peer.
Definition: HttpTunneler.cc:176
void commSetConnTimeout(const Comm::ConnectionPointer &conn, time_t timeout, AsyncCall::Pointer &callback)
Definition: comm.cc:592
Definition: CommCalls.h:133
Definition: CommCalls.h:127
time_t MortalReadTimeout(const time_t startTime, const time_t lifetimeLimit)
maximum read delay for readers with limited lifetime
Definition: Read.cc:248
static void httpBuildRequestHeader(HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &al, HttpHeader *hdr_out, const Http::StateFlags &flags)
Definition: http.cc:1904
Definition: errorpage.h:88
CBDATA_NAMESPACED_CLASS_INIT(Http, Tunneler)
void comm_remove_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:981
Definition: HttpHeader.h:74
void watchForClosures()
make sure we quit if/when the connection is gone
Definition: HttpTunneler.cc:102
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products