This commit is contained in:
Lu Qiuwen
2018-10-11 10:42:05 +08:00
committed by zhengchao
parent b8342e5358
commit 68ee4bdd79

View File

@@ -391,9 +391,8 @@ static void html_generate(int status_code, int cfg_id, const char* msg, char **
}
tpl->Expand(&output, &dict);
*page_size = output.length();
*page_buff = ALLOC(char, *page_size);
memcpy(*page_buff, output.c_str(), *page_size);
*page_size = output.length() + 1;
*page_buff = strdup(output.c_str());
}
static void html_free(char ** page_buff)
@@ -576,7 +575,8 @@ static void http_reject(const struct tfe_http_session * session, enum tfe_http_e
{
TFE_LOG_ERROR(g_pangu_rt->local_logger, "Invalid reject rule %d paramter %s",
ctx->enforce_rules[0].config_id, ctx->enforce_para);
ctx->action==PG_ACTION_NONE;
ctx->action = PG_ACTION_NONE;
goto error_out;
}
@@ -631,7 +631,6 @@ static void http_redirect(const struct tfe_http_session * session, enum tfe_http
error_out:
free(url);
return;
}
enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_http_event events,