4 writes to StatusCode
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Internal\Http\HttpProtocol.cs (2)
758StatusCode = StatusCodes.Status499ClientClosedRequest; 1349StatusCode = statusCode;
Internal\Http\HttpProtocol.FeatureCollection.cs (2)
127set => StatusCode = value; 283StatusCode = StatusCodes.Status101SwitchingProtocols;
29 references to StatusCode
Microsoft.AspNetCore.Server.Kestrel.Core (29)
Internal\Http\HttpProtocol.cs (18)
249ThrowResponseAlreadyStartedException(nameof(StatusCode)); 914StatusCode != StatusCodes.Status304NotModified && 1002Output.WriteResponseHeaders(StatusCode, ReasonPhrase, responseHeaders, _autoChunk, appCompleted); 1186else if (StatusCode == StatusCodes.Status205ResetContent && responseHeaders.ContentLength.Value != 0) 1194else if (StatusCode == StatusCodes.Status101SwitchingProtocols) 1266if (Is1xxCode(StatusCode) || StatusCode == StatusCodes.Status204NoContent) 1272else if (Method == HttpMethod.Connect && Is2xxCode(StatusCode)) 1289StatusCode != StatusCodes.Status204NoContent && 1290StatusCode != StatusCodes.Status205ResetContent && 1291StatusCode != StatusCodes.Status304NotModified; 1301StatusCode != StatusCodes.Status304NotModified; 1310=> RejectInvalidResponse(appCompleted, CoreStrings.FormatHeaderNotAllowedOnResponse(headerName, StatusCode)); 1380throw new InvalidOperationException(CoreStrings.FormatWritingToResponseBodyNotSupported(StatusCode)); 1648Output.WriteResponseHeaders(StatusCode, ReasonPhrase, responseHeaders, _autoChunk, appCompleted: false); 1652return Output.FirstWriteChunkedAsync(StatusCode, ReasonPhrase, responseHeaders, _autoChunk, data.Span, cancellationToken); 1657return Output.FirstWriteAsync(StatusCode, ReasonPhrase, responseHeaders, _autoChunk, data.Span, cancellationToken); 1662Output.WriteResponseHeaders(StatusCode, ReasonPhrase, responseHeaders, _autoChunk, appCompleted: false);
Internal\Http\HttpProtocol.FeatureCollection.cs (3)
126get => StatusCode; 304if (StatusCode < StatusCodes.Status200OK || StatusCodes.Status300MultipleChoices <= StatusCode)
Internal\Http2\Http2FrameWriter.cs (4)
247WriteResponseHeaders(stream.StreamId, stream.StatusCode, Http2HeadersFrameFlags.NONE, (HttpResponseHeaders)stream.ResponseHeaders); 490WriteResponseHeadersUnsynchronized(stream.StreamId, stream.StatusCode, Http2HeadersFrameFlags.END_STREAM, (HttpResponseHeaders)stream.ResponseHeaders); 579WriteResponseHeadersUnsynchronized(streamId, stream.StatusCode, Http2HeadersFrameFlags.NONE, (HttpResponseHeaders)stream.ResponseHeaders); 796WriteResponseHeadersUnsynchronized(stream.StreamId, stream.StatusCode, Http2HeadersFrameFlags.NONE, (HttpResponseHeaders)stream.ResponseHeaders);
Internal\Infrastructure\StatusCheckPipeWriter.cs (2)
34if (_context.StatusCode < 300) 36throw new InvalidOperationException(CoreStrings.FormatConnectResponseCanNotHaveBody(_context.StatusCode));
Internal\Infrastructure\StatusCheckWriteStream.cs (2)
28if (_context.StatusCode < 300) 30throw new InvalidOperationException(CoreStrings.FormatConnectResponseCanNotHaveBody(_context.StatusCode));