Issue #4264 Revert doError signature
revert the doError signature. Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
b455b8abcc
commit
070d2b235e
|
@ -27,11 +27,9 @@ import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.servlet.RequestDispatcher;
|
import javax.servlet.RequestDispatcher;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
@ -95,7 +93,7 @@ public class ErrorHandler extends AbstractHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doError(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
public void doError(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
|
||||||
{
|
{
|
||||||
String cacheControl = getCacheControl();
|
String cacheControl = getCacheControl();
|
||||||
if (cacheControl != null)
|
if (cacheControl != null)
|
||||||
|
@ -113,15 +111,23 @@ public class ErrorHandler extends AbstractHandler
|
||||||
{
|
{
|
||||||
if (errorDispatcher != null)
|
if (errorDispatcher != null)
|
||||||
{
|
{
|
||||||
errorDispatcher.error(request, response);
|
try
|
||||||
}
|
{
|
||||||
else
|
errorDispatcher.error(request, response);
|
||||||
{
|
return;
|
||||||
String message = (String)request.getAttribute(Dispatcher.ERROR_MESSAGE);
|
}
|
||||||
if (message == null)
|
catch (ServletException e)
|
||||||
message = baseRequest.getResponse().getReason();
|
{
|
||||||
generateAcceptableResponse(baseRequest, request, response, response.getStatus(), message);
|
LOG.debug(e);
|
||||||
|
if (response.isCommitted())
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String message = (String)request.getAttribute(Dispatcher.ERROR_MESSAGE);
|
||||||
|
if (message == null)
|
||||||
|
message = baseRequest.getResponse().getReason();
|
||||||
|
generateAcceptableResponse(baseRequest, request, response, response.getStatus(), message);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue