| 395 | } |
| 396 | |
| 397 | void |
| 398 | Transaction::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 | |
| 407 | namespace |
| 408 | { |
nothing calls this directly
no test coverage detected