26 AsyncJob(
"Adaptation::Icap::OptXact"),
45 makeRequest(requestBuf);
46 debugs(93, 9,
"request " << status() <<
":\n" <<
49 scheduleWrite(requestBuf);
61 buf.
append(
"Connection: close\r\n", 19);
66 buf.
append(
"trailers\r\n", 10);
78 "-byte request " << status());
84 if (parseResponse()) {
85 Must(icapReply !=
nullptr);
89 readAll = icapReply->header.getByNameListMember(
"Encapsulated",
90 "opt-body",
',').isEmpty();
91 debugs(93, 7,
"readAll=" << readAll);
104 debugs(93, 5,
"have " << readBuf.length() <<
" bytes to parse" << status());
110 if (!parseHttpMsg(r.
getRaw()))
113 static SBuf close(
"close", 5);
115 reuseConnection =
false;
131 if (icapReply !=
nullptr && al.icap.bytesRead > icapReply->hdr_sz)
132 al.icap.bodyBytesRead = al.icap.bytesRead - icapReply->hdr_sz;
140 AsyncJob(
"Adaptation::Icap::OptXactLauncher"),
#define SQUIDSTRINGPRINT(s)
#define CBDATA_NAMESPACED_CLASS_INIT(namespace, type)
static Answer Forward(Http::Message *aMsg)
create an akForward answer
OptXactLauncher(Adaptation::ServicePointer aService)
Xaction * createXaction() override
void handleCommWrote(size_t size) override
void start() override
called by AsyncStart; do not call directly
void makeRequest(MemBuf &buf)
OptXact(ServiceRep::Pointer &aService)
void startShoveling() override
starts sending/receiving ICAP messages
void finalizeLogInfo() override
void handleCommRead(size_t size) override
void start() override
called by AsyncStart; do not call directly
virtual void finalizeLogInfo()
const ServiceConfig & cfg() const
void append(const char *c, int sz) override
void init(mb_size_t szInit, mb_size_t szMax)
char * content()
start of the added data
mb_size_t contentSize() const
available data size
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
#define debugs(SECTION, LEVEL, CONTENT)
const XactOutcome xoOpt
OPTION transaction.
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format