Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Mar 11, 2018
2 parents cfe937a + 8e652ca commit 0ce435f
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 0ce435f

Please sign in to comment.