当使用 __ajax=json 参数的时候 403 页面返回空字符的优化。

This commit is contained in:
thinkgem
2020-08-23 23:59:10 +08:00
parent 78c3f02f41
commit 4ac34013b3
3 changed files with 10 additions and 8 deletions

View File

@@ -362,7 +362,9 @@ public class ServletUtils {
type = MediaType.TEXT_PLAIN_VALUE;
}
}
response.setContentType(type);
if (type != null) {
response.setContentType(type);
}
response.getWriter().print(string);
} catch (IOException e) {
e.printStackTrace();