mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-09-20 10:37:57 +08:00
修复SaServletFilter
异常函数中无法自定义Content-Type
的问题
This commit is contained in:
@@ -167,7 +167,9 @@ public class SaServletFilter implements Filter {
|
|||||||
String resultString = String.valueOf(result);
|
String resultString = String.valueOf(result);
|
||||||
|
|
||||||
// 2. 写入输出流
|
// 2. 写入输出流
|
||||||
response.setContentType("text/plain; charset=utf-8");
|
if(response.getContentType() == null) {
|
||||||
|
response.setContentType("text/plain; charset=utf-8");
|
||||||
|
}
|
||||||
response.getWriter().print(resultString);
|
response.getWriter().print(resultString);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user