bugfix:增加代理日志中sub_action行为,修复日志发送判断
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user