1.修复由于页面中存在jquery库的异步处理,造成页面加载css,jss失败

This commit is contained in:
fengweihao
2019-06-10 17:20:05 +08:00
parent c8526a2a58
commit f986119d35
2 changed files with 25 additions and 3 deletions

View File

@@ -1740,8 +1740,11 @@ static void http_insert(const struct tfe_stream * stream, const struct tfe_http_
rewrite_buff = NULL;
rewrite_sz = 0;
rewrite_sz = execute_insert_rule(http_body, http_body_len, ins_ctx->rule, &rewrite_buff);
if (rewrite_sz >0 && strstr(cont_type_val, "text/html"))
if (strstr(cont_type_val, "text/html") != NULL)
{
rewrite_sz = execute_insert_rule(http_body, http_body_len, ins_ctx->rule, &rewrite_buff);
}
if (rewrite_sz >0)
{
tfe_http_half_append_body(ins_ctx->replacing, rewrite_buff, rewrite_sz, 0);
ins_ctx->actually_replaced=1;