Revert "Merged branch 'jetty-9.2.x' into 'master'."

This reverts commit 701ca1aa26, reversing
changes made to 64ba5a6ef8.
This commit is contained in:
Simone Bordet 2015-09-29 11:31:56 +02:00
parent 9549b32ea6
commit 1f2f62cff4
5 changed files with 48 additions and 74 deletions

View File

@ -234,11 +234,7 @@ public abstract class AbstractConnection implements Connection
@Override @Override
public String toString() public String toString()
{ {
return String.format("%s@%x[%s,%s]", return String.format("%s@%x", getClass().getSimpleName(), hashCode());
getClass().getSimpleName(),
hashCode(),
_state.get(),
_endPoint);
} }
private class ReadCallback implements Callback private class ReadCallback implements Callback

View File

@ -554,7 +554,8 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
_requests, _requests,
_committed.get(), _committed.get(),
_state.getState(), _state.getState(),
_uri); _state.getState()==HttpChannelState.State.IDLE?"-":_request.getRequestURI()
);
} }
public void onRequest(MetaData.Request request) public void onRequest(MetaData.Request request)

View File

@ -517,55 +517,6 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
return new Content(c); 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 private class Content extends HttpInput.Content
{ {
public Content(ByteBuffer 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); 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);
}
} }

View File

@ -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 public static class PoisonPillContent extends Content
{ {
private final String _name; private final String _name;

View File

@ -2250,13 +2250,7 @@ public class Request implements HttpServletRequest
@Override @Override
public String toString() public String toString()
{ {
return String.format("%s%s%s %s%s@%x", return (_handled?"[":"(") + getMethod() + " " + _metadata.getURI() + (_handled?"]@":")@") + hashCode() + " " + super.toString();
getClass().getSimpleName(),
_handled ? "[" : "(",
getMethod(),
_uri,
_handled ? "]" : ")",
hashCode());
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */