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

Method miss

plugins/experimental/inliner/cache-handler.h:299–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297 }
298
299 void
300 miss()
301 {
302 assert(sink_ != nullptr);
303 *sink_ << original_;
304 if (!src_.empty()) {
305 *sink_ << "src=\"" << src_ << "\" ";
306 }
307 if (!classes_.empty()) {
308 *sink_ << "class=\"" << classes_ << "\" ";
309 }
310 sink_.reset();
311
312 assert(sink2_ != nullptr);
313 sink2_.reset();
314
315 const std::string b;
316
317 {
318 const size_t DOUBLE_SLASH = src_.find("//");
319 if (DOUBLE_SLASH != std::string::npos) {
320 const_cast<std::string &>(b) = src_.substr(DOUBLE_SLASH + 2);
321 } else {
322 const_cast<std::string &>(b) = src_;
323 }
324 }
325
326 const std::string::const_iterator b1 = b.begin(), b2 = b.end(), i = std::find(b1, b2, '/');
327
328 std::string request = "GET ";
329 request += std::string(i, b2);
330 request += " HTTP/1.1\r\n";
331 request += "Host: ";
332 request += std::string(b1, i);
333 request += "\r\n\r\n";
334
335 auto io{std::make_unique<io::IO>()};
336
337 Dbg(dbg_ctl, "request:\n%s", request.c_str());
338
339 auto size{io->copy(request)};
340 ats::get(std::move(io), size, AnotherClass(src_));
341 }
342 };
343
344} // namespace inliner

Callers 1

handleMethod · 0.80

Calls 11

stringClass · 0.85
AnotherClassClass · 0.85
getFunction · 0.70
emptyMethod · 0.45
resetMethod · 0.45
findMethod · 0.45
substrMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected