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