82 references to _incomingFrame
Microsoft.AspNetCore.Server.Kestrel.Core (82)
Internal\Http2\Http2Connection.cs (82)
335while (Http2FrameReader.TryReadFrame(ref buffer, _incomingFrame, _serverSettings.MaxFrameSize, out var framePayload)) 338Log.Http2FrameReceived(ConnectionId, _incomingFrame); 348AbortStream(_incomingFrame.StreamId, new IOException(ex.Message, ex)); 683if (_incomingFrame.StreamId != 0 && (_incomingFrame.StreamId & 1) == 0) 685throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdEven(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.InvalidStreamId); 688return _incomingFrame.Type switch 711if (_incomingFrame.StreamId == 0) 716if (_incomingFrame.DataHasPadding && _incomingFrame.DataPadLength >= _incomingFrame.PayloadLength) 718throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorPaddingTooLong(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.InvalidDataPadding); 723if (_streams.TryGetValue(_incomingFrame.StreamId, out var stream)) 740throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamHalfClosedRemote(_incomingFrame.Type, stream.StreamId), Http2ErrorCode.STREAM_CLOSED, ConnectionEndReason.FrameAfterStreamClose); 743return stream.OnDataAsync(_incomingFrame, payload); 757throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamClosed(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.STREAM_CLOSED, ConnectionEndReason.UnknownStream); 762return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamAborted(_incomingFrame.Type, stream.StreamId), Http2ErrorCode.STREAM_CLOSED, ConnectionEndReason.FrameAfterStreamClose); 767return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdZero(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.InvalidStreamId); 772return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdNotZero(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.InvalidStreamId); 778return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorHeadersInterleaved(_incomingFrame.Type, _incomingFrame.StreamId, _currentHeadersStream.StreamId), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.UnexpectedFrame); 783return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorUnexpectedFrameLength(_incomingFrame.Type, expectedLength), Http2ErrorCode.FRAME_SIZE_ERROR, ConnectionEndReason.InvalidFrameLength); 793if (_incomingFrame.StreamId == 0) 798if (_incomingFrame.HeadersHasPadding && _incomingFrame.HeadersPadLength >= _incomingFrame.PayloadLength - 1) 800throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorPaddingTooLong(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.InvalidDataPadding); 803if (_incomingFrame.HeadersHasPriority && _incomingFrame.HeadersStreamDependency == _incomingFrame.StreamId) 805throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamSelfDependency(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.StreamSelfDependency); 808if (_streams.TryGetValue(_incomingFrame.StreamId, out var stream)) 825throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamHalfClosedRemote(_incomingFrame.Type, stream.StreamId), Http2ErrorCode.STREAM_CLOSED, ConnectionEndReason.FrameAfterStreamClose); 829if (!_incomingFrame.HeadersEndStream) 838var headersPayload = payload.Slice(0, _incomingFrame.HeadersPayloadLength); // Minus padding 839return DecodeTrailersAsync(_incomingFrame.HeadersEndHeaders, headersPayload); 841else if (_incomingFrame.StreamId <= _highestOpenedStreamId) 850throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamClosed(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.STREAM_CLOSED, ConnectionEndReason.InvalidStreamId); 861if (!_incomingFrame.HeadersEndHeaders) 869_headerFlags = _incomingFrame.HeadersFlags; 871var headersPayload = payload.Slice(0, _incomingFrame.HeadersPayloadLength); // Minus padding 872return DecodeHeadersAsync(_incomingFrame.HeadersEndHeaders, headersPayload); 880stream.InitializeWithExistingContext(_incomingFrame.StreamId); 901_incomingFrame.StreamId, 921if (_incomingFrame.StreamId == 0) 926if (_incomingFrame.PriorityStreamDependency == _incomingFrame.StreamId) 928throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamSelfDependency(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.StreamSelfDependency); 931if (_incomingFrame.PayloadLength != 5) 946if (_incomingFrame.StreamId == 0) 951if (_incomingFrame.PayloadLength != 4) 958if (_streams.TryGetValue(_incomingFrame.StreamId, out var stream)) 986if (_incomingFrame.StreamId != 0) 991if (_incomingFrame.SettingsAck) 993if (_incomingFrame.PayloadLength != 0) 1001if (_incomingFrame.PayloadLength % 6 != 0) 1070if (_incomingFrame.StreamId != 0) 1075if (_incomingFrame.PayloadLength != 8) 1086if (_incomingFrame.PingAck) 1104if (_incomingFrame.StreamId != 0) 1123if (_incomingFrame.PayloadLength != 4) 1130if (_incomingFrame.WindowUpdateSizeIncrement == 0) 1150if (_incomingFrame.StreamId == 0) 1152if (!_frameWriter.TryUpdateConnectionWindow(_incomingFrame.WindowUpdateSizeIncrement)) 1157else if (_streams.TryGetValue(_incomingFrame.StreamId, out var stream)) 1165if (!stream.TryUpdateOutputWindow(_incomingFrame.WindowUpdateSizeIncrement)) 1167throw new Http2StreamErrorException(_incomingFrame.StreamId, CoreStrings.Http2ErrorWindowUpdateSizeInvalid, Http2ErrorCode.FLOW_CONTROL_ERROR); 1187if (_incomingFrame.StreamId != _currentHeadersStream.StreamId) 1194return DecodeTrailersAsync(_incomingFrame.ContinuationEndHeaders, payload); 1200if (_incomingFrame.HeadersEndHeaders) 1205return DecodeHeadersAsync(_incomingFrame.ContinuationEndHeaders, payload); 1266_streams[_incomingFrame.StreamId] = _currentHeadersStream; 1381if (_incomingFrame.StreamId > _highestOpenedStreamId) 1383throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdle(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.InvalidStreamId); 1439throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamClosed(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.STREAM_CLOSED, ConnectionEndReason.FrameAfterStreamClose);