bugfix:增加代理日志中sub_action行为,修复日志发送判断

This commit is contained in:
fengweihao
2022-08-01 16:05:25 +08:00
parent c4c03bfc4e
commit e52bafad6b
2 changed files with 3 additions and 4 deletions

View File

@@ -1587,6 +1587,7 @@ void http_lua(const struct tfe_stream * stream, const struct tfe_http_session *
tsg_ctx->actually_executed =1;
}
tsg_ctx->http_req_uri=0;
tsg_ctx->execut_lua_sucess=0;
tsg_ctx->replacing = tfe_http_session_request_create(to_write_sess, in_req_spec->method, in_req_spec->uri);
tfe_http_session_request_set(to_write_sess, tsg_ctx->replacing);
}
@@ -1596,9 +1597,8 @@ void http_lua(const struct tfe_stream * stream, const struct tfe_http_session *
tfe_http_session_response_set(to_write_sess, tsg_ctx->replacing);
}
tsg_ctx->execut_lua_sucess=0;
ret=execute_lua_script_rule(lua_script, tsg_ctx->profile_id, tsg_ctx->lua_ctx, ctx->thread_id, (void *)tsg_ctx);
if(ret>0 && tsg_ctx->actually_executed==1)
if(ret>0 && tsg_ctx->execut_lua_sucess==1)
{
tsg_ctx->actually_executed =1;
}
@@ -2981,7 +2981,6 @@ static inline int ctx_actually_replaced(struct pangu_http_ctx * ctx)
static inline int ctx_actually_ran_script(struct pangu_http_ctx * ctx)
{
if(ctx->action == PG_ACTION_MANIPULATE &&
ctx->param->action == MA_ACTION_LUA_SCRIPT &&
ctx->tsg_ctx->actually_executed==1)