Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Use a more reliable mechanism for the DefaultServlet when determining…
Browse files Browse the repository at this point in the history
… if the current request is for custom error page or not.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc8.0.x/trunk@1793470 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed May 2, 2017
1 parent b4e88e3 commit e070a31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion java/org/apache/catalina/servlets/DefaultServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ protected void serveResource(HttpServletRequest request,
return;
}

boolean isError = response.getStatus() >= HttpServletResponse.SC_BAD_REQUEST;
boolean isError = DispatcherType.ERROR == request.getDispatcherType();

boolean included = false;
// Check if the conditions specified in the optional If headers are
Expand Down
5 changes: 5 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
ensure that that correct encoding (path differs from query string) is
applied and that the encoding is applied consistently. (markt)
</fix>
<fix>
Use a more reliable mechanism for the <code>DefaultServlet</code> when
determining if the current request is for custom error page or not.
(markt)
</fix>
</changelog>
</subsection>
<subsection name="Jasper">
Expand Down

0 comments on commit e070a31

Please sign in to comment.