[Bug 383251] socket timeout exception returns 504, ioexception returns 500 in connector handler

This commit is contained in:
Jesse McConnell 2012-06-21 12:14:23 -05:00
parent 42843730ac
commit 2c384bb78d
1 changed files with 8 additions and 0 deletions

View File

@ -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());