| 179 | } |
| 180 | |
| 181 | void |
| 182 | Transaction::setErrorBody(const std::string &page) |
| 183 | { |
| 184 | LOG_DEBUG("Transaction tshttptxn=%p setting error body page length: %lu", state_->txn_, page.length()); |
| 185 | char *body = static_cast<char *>(TSmalloc(page.length())); |
| 186 | memcpy(body, page.data(), page.length()); |
| 187 | TSHttpTxnErrorBodySet(state_->txn_, body, page.length(), nullptr); // Default to text/html |
| 188 | } |
| 189 | |
| 190 | void |
| 191 | Transaction::setErrorBody(const std::string &page, const std::string &mimetype) |