diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java index ce15cd40693..f0185b0f0a1 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java @@ -234,11 +234,7 @@ public abstract class AbstractConnection implements Connection @Override public String toString() { - return String.format("%s@%x[%s,%s]", - getClass().getSimpleName(), - hashCode(), - _state.get(), - _endPoint); + return String.format("%s@%x", getClass().getSimpleName(), hashCode()); } private class ReadCallback implements Callback diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index d6295de76c3..9e02326dfc8 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -554,7 +554,8 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor _requests, _committed.get(), _state.getState(), - _uri); + _state.getState()==HttpChannelState.State.IDLE?"-":_request.getRequestURI() + ); } public void onRequest(MetaData.Request request) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java index 791d05e3701..4f3a84b1474 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java @@ -517,55 +517,6 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http return new Content(c); } - @Override - public void abort(Throwable failure) - { - // Do a direct close of the output, as this may indicate to a client that the - // response is bad either with RST or by abnormal completion of chunked response. - getEndPoint().close(); - } - - @Override - public boolean isPushSupported() - { - return false; - } - - /** - * @see org.eclipse.jetty.server.HttpTransport#push(org.eclipse.jetty.http.MetaData.Request) - */ - @Override - public void push(org.eclipse.jetty.http.MetaData.Request request) - { - LOG.debug("ignore push in {}",this); - } - - public void asyncReadFillInterested() - { - getEndPoint().fillInterested(_asyncReadCallback); - } - - public void blockingReadFillInterested() - { - getEndPoint().fillInterested(_blockingReadCallback); - } - - public void blockingReadException(Throwable e) - { - _blockingReadCallback.failed(e); - } - - @Override - public String toString() - { - return String.format("%s[p=%s,g=%s,c=%s]", - super.toString(), - _parser, - _generator, - _channel); - return super.toString()+"<--"+BufferUtil.toDetailString(_requestBuffer); - } - private class Content extends HttpInput.Content { public Content(ByteBuffer content) @@ -813,4 +764,48 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http return String.format("%s[i=%s,cb=%s]",super.toString(),_info,_callback); } } + + @Override + public void abort(Throwable failure) + { + // Do a direct close of the output, as this may indicate to a client that the + // response is bad either with RST or by abnormal completion of chunked response. + getEndPoint().close(); + } + + @Override + public boolean isPushSupported() + { + return false; + } + + /** + * @see org.eclipse.jetty.server.HttpTransport#push(org.eclipse.jetty.http.MetaData.Request) + */ + @Override + public void push(org.eclipse.jetty.http.MetaData.Request request) + { + LOG.debug("ignore push in {}",this); + } + + public void asyncReadFillInterested() + { + getEndPoint().fillInterested(_asyncReadCallback); + } + + public void blockingReadFillInterested() + { + getEndPoint().fillInterested(_blockingReadCallback); + } + + public void blockingReadException(Throwable e) + { + _blockingReadCallback.failed(e); + } + + @Override + public String toString() + { + return super.toString()+"<--"+BufferUtil.toDetailString(_requestBuffer); + } } diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java index aab55d5c413..cb47ec11f73 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java @@ -634,18 +634,6 @@ public class HttpInput extends ServletInputStream implements Runnable } } - @Override - public String toString() - { - return String.format("%s@%x[r=%d,s=%s,e=%s,f=%s]", - getClass().getSimpleName(), - hashCode(), - _contentRead, - _contentState, - _eofState, - _onError); - } - public static class PoisonPillContent extends Content { private final String _name; diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 817a4e1c04f..76b62dae51d 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -2250,13 +2250,7 @@ public class Request implements HttpServletRequest @Override public String toString() { - return String.format("%s%s%s %s%s@%x", - getClass().getSimpleName(), - _handled ? "[" : "(", - getMethod(), - _uri, - _handled ? "]" : ")", - hashCode()); + return (_handled?"[":"(") + getMethod() + " " + _metadata.getURI() + (_handled?"]@":")@") + hashCode() + " " + super.toString(); } /* ------------------------------------------------------------ */