diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java index 991768f1121..b053fbb0dd6 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java @@ -410,6 +410,9 @@ public abstract class HttpReceiver if (exchange == null) return false; + if (LOG.isDebugEnabled()) + LOG.debug("Response failure " + exchange.getResponse(), failure); + // Mark atomically the response as completed, with respect // to concurrency between response success and response failure. if (exchange.responseComplete(failure)) @@ -514,7 +517,7 @@ public abstract class HttpReceiver HttpResponse response = exchange.getResponse(); if (LOG.isDebugEnabled()) - LOG.debug("Response failure {} {} on {}: {}", response, exchange, getHttpChannel(), failure); + LOG.debug("Response abort {} {} on {}: {}", response, exchange, getHttpChannel(), failure); List listeners = exchange.getConversation().getResponseListeners(); ResponseNotifier notifier = getHttpDestination().getResponseNotifier(); notifier.notifyFailure(listeners, response, failure); diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java index e9e74b7c6f4..5e430d39515 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java @@ -344,6 +344,9 @@ public abstract class HttpSender implements AsyncContentProvider.Listener if (exchange == null) return; + if (LOG.isDebugEnabled()) + LOG.debug("Request failure " + exchange.getRequest(), failure); + // Mark atomically the request as completed, with respect // to concurrency between request success and request failure. if (exchange.requestComplete(failure)) @@ -559,7 +562,7 @@ public abstract class HttpSender implements AsyncContentProvider.Listener Request request = exchange.getRequest(); if (LOG.isDebugEnabled()) - LOG.debug("Request failure {} {} on {}: {}", request, exchange, getHttpChannel(), failure); + LOG.debug("Request abort {} {} on {}: {}", request, exchange, getHttpChannel(), failure); HttpDestination destination = getHttpChannel().getHttpDestination(); destination.getRequestNotifier().notifyFailure(request, failure); diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java index 1edae133609..cba89775783 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java @@ -288,7 +288,6 @@ public class HttpSenderOverHTTP extends HttpSender public void failed(Throwable x) { release(); - callback.failed(x); super.failed(x); } @@ -299,6 +298,13 @@ public class HttpSenderOverHTTP extends HttpSender callback.succeeded(); } + @Override + protected void onCompleteFailure(Throwable cause) + { + super.onCompleteFailure(cause); + callback.failed(cause); + } + private void release() { ByteBufferPool bufferPool = httpClient.getByteBufferPool(); diff --git a/jetty-io/src/test/resources/jetty-logging.properties b/jetty-io/src/test/resources/jetty-logging.properties index 257743ed54b..0e7fd71dc25 100644 --- a/jetty-io/src/test/resources/jetty-logging.properties +++ b/jetty-io/src/test/resources/jetty-logging.properties @@ -1,5 +1,5 @@ org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -org.eclipse.jetty.LEVEL=INFO +#org.eclipse.jetty.LEVEL=DEBUG #org.eclipse.jetty.io.AbstractConnection.LEVEL=DEBUG #org.eclipse.jetty.io.ManagedSelector.LEVEL=DEBUG #org.eclipse.jetty.io.ssl.SslConnection.LEVEL=DEBUG