MCPcopy Create free account
hub / github.com/apache/trafficserver / ts_lua_update_server_response_hdrp

Function ts_lua_update_server_response_hdrp

plugins/lua/ts_lua_util.cc:53–62  ·  view source on GitHub ↗

Update http_ctx->server_response_hdrp if there. This is required in the beginning of toughing response, because holding old pointer could be freed by core. */

Source from the content-addressed store, hash-verified

51 This is required in the beginning of toughing response, because holding old pointer could be freed by core.
52 */
53void
54ts_lua_update_server_response_hdrp(ts_lua_http_ctx *http_ctx)
55{
56 if (http_ctx->server_response_hdrp) {
57 if (TSHttpTxnServerRespGet(http_ctx->txnp, &http_ctx->server_response_bufp, &http_ctx->server_response_hdrp) != TS_SUCCESS) {
58 TSError("[ts_lua][%s] failed to get server response", __FUNCTION__);
59 return;
60 }
61 }
62}
63
64void
65ts_lua_clear_http_ctx(ts_lua_http_ctx *http_ctx)

Callers 1

ts_lua_http_cont_handlerFunction · 0.85

Calls 2

TSHttpTxnServerRespGetFunction · 0.85
TSErrorFunction · 0.50

Tested by

no test coverage detected