diff --git a/plugins/lua/ts_lua_util.cc b/plugins/lua/ts_lua_util.cc index 7eacada39cf..94150d9b09c 100644 --- a/plugins/lua/ts_lua_util.cc +++ b/plugins/lua/ts_lua_util.cc @@ -53,7 +53,10 @@ void ts_lua_update_server_response_hdrp(ts_lua_http_ctx *http_ctx) { if (http_ctx->server_response_hdrp) { - TSHttpTxnServerRespGet(http_ctx->txnp, &http_ctx->server_response_bufp, &http_ctx->server_response_hdrp); + if (TSHttpTxnServerRespGet(http_ctx->txnp, &http_ctx->server_response_bufp, &http_ctx->server_response_hdrp) != TS_SUCCESS) { + TSError("[ts_lua][%s] failed to get server response", __FUNCTION__); + return; + } } }