nsresult Http2PushedStream::ReadSegments(nsAHttpSegmentReader *reader, uint32_t, uint32_t *count) { nsresult rv = NS_OK; *count = 0; switch (mUpstreamState) { case GENERATING_HEADERS: // The request headers for this has been processed, so we need to verify // that :authority, :scheme, and :path MUST be present. :method MUST NOT be // present CreatePushHashKey(mHeaderScheme, mHeaderHost, mSession->Serial(), mHeaderPath, mOrigin, mHashKey); LOG3(("Http2PushStream 0x%X hash key %s\n", mStreamID, mHashKey.get())); // the write side of a pushed transaction just involves manipulating a little state SetSentFin(true); Http2Stream::mRequestHeadersDone = 1; Http2Stream::mOpenGenerated = 1; Http2Stream::ChangeState(UPSTREAM_COMPLETE); break; case UPSTREAM_COMPLETE: // Let's just clear the stream's transmit buffer by pushing it into // the session. This is probably a window adjustment. LOG3(("Http2Push::ReadSegments 0x%X \n", mStreamID)); mSegmentReader = reader; rv = TransmitFrame(nullptr, nullptr, true); mSegmentReader = nullptr; break; case GENERATING_BODY: case SENDING_BODY: case SENDING_FIN_STREAM: default: break; } return rv; }
nsresult Http2PushedStream::ReadSegments(nsAHttpSegmentReader *, uint32_t, uint32_t *count) { // The request headers for this has been processed, so we need to verify // that :authority, :scheme, and :path MUST be present. :method MUST NOT be // present CreatePushHashKey(mHeaderScheme, mHeaderHost, mSession->Serial(), mHeaderPath, mOrigin, mHashKey); LOG3(("Http2PushStream 0x%X hash key %s\n", mStreamID, mHashKey.get())); // the write side of a pushed transaction just involves manipulating a little state SetSentFin(true); Http2Stream::mRequestHeadersDone = 1; Http2Stream::mOpenGenerated = 1; Http2Stream::ChangeState(UPSTREAM_COMPLETE); *count = 0; return NS_OK; }