[Bug 383251] socket timeout exception returns 504, ioexception returns 500 in connector handler
This commit is contained in:
parent
42843730ac
commit
2c384bb78d
|
@ -2,6 +2,7 @@ package org.eclipse.jetty.server.handler;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.nio.channels.SelectionKey;
|
||||
|
@ -230,6 +231,13 @@ public class ConnectHandler extends HandlerWrapper
|
|||
{
|
||||
channel = connectToServer(request,host,port);
|
||||
}
|
||||
catch (SocketException se)
|
||||
{
|
||||
LOG.info("ConnectHandler: " + se.getMessage());
|
||||
response.setStatus(HttpServletResponse.SC_GATEWAY_TIMEOUT);
|
||||
baseRequest.setHandled(true);
|
||||
return;
|
||||
}
|
||||
catch (SocketTimeoutException ste)
|
||||
{
|
||||
LOG.info("ConnectHandler: " + ste.getMessage());
|
||||
|
|
Loading…
Reference in New Issue