| 166 | } |
| 167 | |
| 168 | void |
| 169 | print_request_headers(TSHttpTxn txn, std::stringstream &output) |
| 170 | { |
| 171 | TSMBuffer buf_c, buf_s; |
| 172 | TSMLoc hdr_loc; |
| 173 | if (TSHttpTxnClientReqGet(txn, &buf_c, &hdr_loc) == TS_SUCCESS) { |
| 174 | output << "{'type':'request', 'side':'client', 'headers': {\n"; |
| 175 | print_headers(buf_c, hdr_loc, output); |
| 176 | output << "\n\t}}"; |
| 177 | TSHandleMLocRelease(buf_c, TS_NULL_MLOC, hdr_loc); |
| 178 | } |
| 179 | if (TSHttpTxnServerReqGet(txn, &buf_s, &hdr_loc) == TS_SUCCESS) { |
| 180 | output << ",{'type':'request', 'side':'server', 'headers': {\n"; |
| 181 | print_headers(buf_s, hdr_loc, output); |
| 182 | output << "\n\t}}"; |
| 183 | TSHandleMLocRelease(buf_s, TS_NULL_MLOC, hdr_loc); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | void |
| 188 | print_response_headers(TSHttpTxn txn, std::stringstream &output) |
no test coverage detected