Skip to content

Commit

Permalink
Merge pull request liukuo362573#120 from LiYinJiang/dev
Browse files Browse the repository at this point in the history
对于无权限用户登录后跳转到/Home/NoPermission页面后,response.CharacterSet存在NPE。补充判断避免直接崩溃
  • Loading branch information
liukuo362573 authored Jul 12, 2022
2 parents 43f5745 + 347c53d commit c2f9d30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YiSha.Util/YiSha.Util/HttpHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private HttpResult GetHttpRequestData(HttpItem httpItem)
}
else
{
if (response.CharacterSet.ToLower().Trim() == "iso-8859-1")
if (response.CharacterSet !=null && response.CharacterSet.ToLower().Trim() == "iso-8859-1")
{
encoding = Encoding.GetEncoding("gbk");
}
Expand Down

0 comments on commit c2f9d30

Please sign in to comment.