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

Method redirectTo

src/tscpp/api/Transaction.cc:397–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397void
398Transaction::redirectTo(std::string const &url)
399{
400 // Must re-alloc the string locally because ownership is transferred to the transaction.
401 char *const buffer = static_cast<char *>(TSmalloc(url.size() + 1));
402 memcpy(buffer, url.c_str(), url.size());
403 buffer[url.size()] = '\0';
404 TSHttpTxnRedirectUrlSet(state_->txn_, buffer, url.size());
405}
406
407namespace
408{

Callers

nothing calls this directly

Calls 5

TSmallocFunction · 0.85
TSHttpTxnRedirectUrlSetFunction · 0.85
memcpyFunction · 0.50
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected