Refactored isRequestHandled() logic to use HttpChannelState.
This commit is contained in:
parent
7b437cd647
commit
93e8af1db5
|
@ -53,7 +53,6 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
||||||
|
|
||||||
private boolean _expect100Continue;
|
private boolean _expect100Continue;
|
||||||
private boolean _delayedUntilContent;
|
private boolean _delayedUntilContent;
|
||||||
private boolean _handled;
|
|
||||||
|
|
||||||
public HttpChannelOverHTTP2(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransportOverHTTP2 transport)
|
public HttpChannelOverHTTP2(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransportOverHTTP2 transport)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +120,6 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
||||||
|
|
||||||
_delayedUntilContent = getHttpConfiguration().isDelayDispatchUntilContent() &&
|
_delayedUntilContent = getHttpConfiguration().isDelayDispatchUntilContent() &&
|
||||||
!endStream && !_expect100Continue;
|
!endStream && !_expect100Continue;
|
||||||
_handled = !_delayedUntilContent;
|
|
||||||
|
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
|
@ -190,7 +188,6 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
||||||
{
|
{
|
||||||
_expect100Continue = false;
|
_expect100Continue = false;
|
||||||
_delayedUntilContent = false;
|
_delayedUntilContent = false;
|
||||||
_handled = false;
|
|
||||||
super.recycle();
|
super.recycle();
|
||||||
getHttpTransport().recycle();
|
getHttpTransport().recycle();
|
||||||
}
|
}
|
||||||
|
@ -277,19 +274,17 @@ public class HttpChannelOverHTTP2 extends HttpChannel
|
||||||
|
|
||||||
boolean wasDelayed = _delayedUntilContent;
|
boolean wasDelayed = _delayedUntilContent;
|
||||||
_delayedUntilContent = false;
|
_delayedUntilContent = false;
|
||||||
if (wasDelayed)
|
|
||||||
_handled = true;
|
|
||||||
return handle || wasDelayed ? this : null;
|
return handle || wasDelayed ? this : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRequestHandled()
|
public boolean isRequestHandled()
|
||||||
{
|
{
|
||||||
return _handled;
|
return !getState().isIdle();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onStreamTimeout(Throwable failure)
|
public boolean onStreamTimeout(Throwable failure)
|
||||||
{
|
{
|
||||||
if (!_handled)
|
if (!isRequestHandled())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
HttpInput input = getRequest().getHttpInput();
|
HttpInput input = getRequest().getHttpInput();
|
||||||
|
|
Loading…
Reference in New Issue