Index: net/spdy/spdy_stream.cc |
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc |
index fe2f37a3e0cdf5e7818731027935089c010c0538..203c27c73b34cf1647bc1c17ab1c2135c58a8f35 100644 |
--- a/net/spdy/spdy_stream.cc |
+++ b/net/spdy/spdy_stream.cc |
@@ -125,7 +125,8 @@ void SpdyStream::SetDelegate(Delegate* delegate) { |
// TODO(baranovich): allow STATE_RESERVED_REMOTE when push promises will be |
// implemented. |
Johnny
2014/06/17 04:01:33
Remove TODO
baranovich
2014/06/17 21:33:43
Done.
|
CHECK(io_state_ == STATE_IDLE || |
- io_state_ == STATE_HALF_CLOSED_LOCAL_UNCLAIMED); |
+ io_state_ == STATE_HALF_CLOSED_LOCAL_UNCLAIMED || |
+ io_state_ == STATE_RESERVED_REMOTE); |
if (io_state_ == STATE_HALF_CLOSED_LOCAL_UNCLAIMED) { |
DCHECK_EQ(type_, SPDY_PUSH_STREAM); |
@@ -419,13 +420,12 @@ int SpdyStream::OnInitialResponseHeadersReceived( |
// Push streams transition to a locally half-closed state upon headers. |
// We must continue to buffer data while waiting for a call to |
// SetDelegate() (which may not ever happen). |
- // TODO(baranovich): For HTTP 2 push streams, delegate may be set before |
- // receiving response headers when PUSH_PROMISE will be implemented. |
- // TODO(baranovich): In HTTP 2 additional HEADERS frames are not allowed. |
- // Set |response_headers_status_| to RESPONSE_HEADERS_ARE_COMPLETE. |
CHECK_EQ(io_state_, STATE_RESERVED_REMOTE); |
- DCHECK(!delegate_); |
- io_state_ = STATE_HALF_CLOSED_LOCAL_UNCLAIMED; |
+ if (!delegate_) { |
+ io_state_ = STATE_HALF_CLOSED_LOCAL_UNCLAIMED; |
+ } else { |
+ io_state_ = STATE_HALF_CLOSED_LOCAL; |
+ } |
break; |
} |