Skip to content

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.5.x/trunk@1793469 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed May 2, 2017
1 parent 111f752 commit 3242efe
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 @@ -794,7 +794,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 @@ -78,6 +78,11 @@
the number of places the associated <code>Charset</code> needs to be
looked up. (markt)
</scode>
<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="Coyote">
Expand Down

0 comments on commit 3242efe

Please sign in to comment.