| 73 | } |
| 74 | |
| 75 | static int |
| 76 | cont_remap(TSCont contp, TSEvent /* event ATS_UNUSED */, void *edata) |
| 77 | { |
| 78 | TSMBuffer bufp; |
| 79 | TSMLoc hdrs; |
| 80 | ArgIndexes *ix = static_cast<ArgIndexes *>(TSContDataGet(contp)); |
| 81 | TSHttpTxn txnp = static_cast<TSHttpTxn>(edata); |
| 82 | TSHttpSsn ssnp = TSHttpTxnSsnGet(txnp); |
| 83 | TSVConn vconnp = TSHttpSsnClientVConnGet(ssnp); |
| 84 | |
| 85 | if (TS_SUCCESS == TSHttpTxnClientRespGet(txnp, &bufp, &hdrs)) { |
| 86 | set_header(bufp, hdrs, "X-Arg-GLB", static_cast<const char *>(TSUserArgGet(nullptr, ix->GLB))); |
| 87 | set_header(bufp, hdrs, "X-Arg-TXN", static_cast<const char *>(TSUserArgGet(txnp, ix->TXN))); |
| 88 | set_header(bufp, hdrs, "X-Arg-SSN", static_cast<const char *>(TSUserArgGet(ssnp, ix->SSN))); |
| 89 | set_header(bufp, hdrs, "X-Arg-VCONN", static_cast<const char *>(TSUserArgGet(vconnp, ix->VCONN))); |
| 90 | } |
| 91 | |
| 92 | TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE); |
| 93 | |
| 94 | return 0; |
| 95 | } |
| 96 | |
| 97 | // Called by ATS as our initialization point |
| 98 | void |
nothing calls this directly
no test coverage detected