修正HTTP-Block动作执行时,content配置为空引起的配置格式校验失败
This commit is contained in:
@@ -729,11 +729,12 @@ static void http_reject(const struct tfe_http_session * session, enum tfe_http_e
|
||||
size_t page_size = 0;
|
||||
|
||||
char cont_len_str[16];
|
||||
char msg[TFE_STRING_MAX];
|
||||
|
||||
char msg[TFE_STRING_MAX] = "";
|
||||
struct tfe_http_session * to_write_sess = NULL;
|
||||
|
||||
ret = sscanf(ctx->enforce_para, "code=%d;content=%[^\n]", &resp_code, msg);
|
||||
if (ret != 2)
|
||||
if (ret != 1 && ret != 2)
|
||||
{
|
||||
TFE_LOG_ERROR(g_pangu_rt->local_logger, "Invalid reject rule %d paramter %s",
|
||||
ctx->enforce_rules[0].config_id, ctx->enforce_para);
|
||||
|
||||
Reference in New Issue
Block a user