Issue #4529 - Fixing HTML error page from showing servlet info if configured not to do so

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2020-03-31 14:58:17 -05:00
parent 524e690140
commit 929ce34640
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
1 changed files with 5 additions and 2 deletions

View File

@ -416,7 +416,10 @@ public class ErrorHandler extends AbstractHandler
htmlRow(writer, "URI", uri);
htmlRow(writer, "STATUS", status);
htmlRow(writer, "MESSAGE", message);
htmlRow(writer, "SERVLET", request.getAttribute(Dispatcher.ERROR_SERVLET_NAME));
if (isShowServlet())
{
htmlRow(writer, "SERVLET", request.getAttribute(Dispatcher.ERROR_SERVLET_NAME));
}
Throwable cause = (Throwable)request.getAttribute(Dispatcher.ERROR_EXCEPTION);
while (cause != null)
{
@ -457,7 +460,7 @@ public class ErrorHandler extends AbstractHandler
while (cause != null)
{
writer.printf("CAUSED BY %s%n", cause);
if (_showStacks && !_disableStacks)
if (isShowStacks() && !_disableStacks)
{
cause.printStackTrace(writer);
}