Skip to content

Commit

Permalink
修复IE乱码问题
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Mar 9, 2018
1 parent b8e3177 commit 8e652ca
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public void afterResponse(Channel clientChannel, Channel proxyChannel, HttpConte
protected boolean isHtml(HttpResponse httpResponse, HttpProxyInterceptPipeline pipeline) {
String accept = pipeline.getHttpRequest().headers().get(HttpHeaderNames.ACCEPT);
String contentType = httpResponse.headers().get(HttpHeaderNames.CONTENT_TYPE);
return accept != null && accept.matches("^.*text/html.*$") && contentType != null && contentType
return httpResponse.status().code() == 200 && accept != null && accept
.matches("^.*text/html.*$") && contentType != null && contentType
.matches("^text/html.*$");
}

Expand Down

0 comments on commit 8e652ca

Please sign in to comment.