| 302 | } |
| 303 | |
| 304 | bool |
| 305 | TransactionData::init_helper(bool dump_body) |
| 306 | { |
| 307 | _dump_body = dump_body; |
| 308 | Dbg(dbg_ctl, "Dumping body bytes: %s", _dump_body ? "true" : "false"); |
| 309 | initialize_default_sensitive_field(); |
| 310 | const std::string sensitive_fields_string = get_sensitive_field_description(); |
| 311 | Dbg(dbg_ctl, "Sensitive fields for which generic values will be dumped: %s", sensitive_fields_string.c_str()); |
| 312 | |
| 313 | if (TS_SUCCESS != |
| 314 | TSUserArgIndexReserve(TS_USER_ARGS_TXN, traffic_dump::debug_tag, "Track transaction related data", &transaction_arg_index)) { |
| 315 | TSError("[%s] Unable to initialize plugin (disabled). Failed to reserve transaction arg.", traffic_dump::debug_tag); |
| 316 | return false; |
| 317 | } |
| 318 | |
| 319 | // Register the collecting of client-request headers at the global level so |
| 320 | // we can process requests before other plugins. (Global hooks are |
| 321 | // processed before session and transaction ones.) |
| 322 | TSCont txn_cont = TSContCreate(global_transaction_handler, nullptr); |
| 323 | TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, txn_cont); |
| 324 | TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, txn_cont); |
| 325 | return true; |
| 326 | } |
| 327 | |
| 328 | void |
| 329 | TransactionData::write_client_request_node_no_content(TSMBuffer &buffer, TSMLoc &hdr_loc) |
nothing calls this directly
no test coverage detected