MCPcopy Create free account
hub / github.com/apache/trafficserver / init

Method init

plugins/esi/combo_handler.cc:201–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199vector<std::string> ContentTypeHandler::_content_type_allowlist;
200
201bool
202InterceptData::init(TSVConn vconn)
203{
204 if (initialized) {
205 LOG_ERROR("InterceptData already initialized!");
206 return false;
207 }
208
209 net_vc = vconn;
210
211 input.buffer = TSIOBufferCreate();
212 input.reader = TSIOBufferReaderAlloc(input.buffer);
213 input.vio = TSVConnRead(net_vc, contp, input.buffer, INT64_MAX);
214
215 req_hdr_bufp = TSMBufferCreate();
216 req_hdr_loc = TSHttpHdrCreate(req_hdr_bufp);
217 TSHttpHdrTypeSet(req_hdr_bufp, req_hdr_loc, TS_HTTP_TYPE_REQUEST);
218
219 fetcher = new HttpDataFetcherImpl(contp, creq.client_addr, "combohandler_fetcher");
220
221 initialized = true;
222 LOG_DEBUG("InterceptData initialized!");
223 return true;
224}
225
226void
227InterceptData::setupWrite()

Callers 1

initRequestProcessingFunction · 0.45

Calls 6

TSIOBufferCreateFunction · 0.85
TSIOBufferReaderAllocFunction · 0.85
TSVConnReadFunction · 0.85
TSMBufferCreateFunction · 0.85
TSHttpHdrCreateFunction · 0.85
TSHttpHdrTypeSetFunction · 0.85

Tested by

no test coverage detected