223 references to ConnectionEndReason
Microsoft.AspNetCore.Server.Kestrel.Core (223)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
140
KestrelMetrics.AddConnectionEndReason(_context.MetricsContext,
ConnectionEndReason
.UnexpectedEndOfRequestContent);
Internal\Http\Http1Connection.cs (23)
104
_http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!,
ConnectionEndReason
.TransportCompleted);
110
_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient),
ConnectionEndReason
.TransportCompleted);
117
public void Abort(ConnectionAbortedException abortReason,
ConnectionEndReason
reason)
127
Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication),
ConnectionEndReason
.AbortedByApp);
135
public void StopProcessingNextRequest(
ConnectionEndReason
reason)
141
internal override void DisableKeepAlive(
ConnectionEndReason
reason)
155
KestrelMetrics.AddConnectionEndReason(MetricsContext,
ConnectionEndReason
.RequestHeadersTimeout);
163
KestrelMetrics.AddConnectionEndReason(MetricsContext,
ConnectionEndReason
.MinRequestBodyDataRate);
625
KestrelMetrics.AddConnectionEndReason(MetricsContext,
ConnectionEndReason
.InvalidRequestHeaders);
636
KestrelMetrics.AddConnectionEndReason(MetricsContext,
ConnectionEndReason
.InvalidRequestHeaders);
661
KestrelMetrics.AddConnectionEndReason(MetricsContext,
ConnectionEndReason
.InvalidRequestHeaders);
670
KestrelMetrics.AddConnectionEndReason(MetricsContext,
ConnectionEndReason
.InvalidRequestHeaders);
736
KestrelMetrics.AddConnectionEndReason(MetricsContext,
ConnectionEndReason
.OtherError);
785
internal static
ConnectionEndReason
GetConnectionEndReason(Microsoft.AspNetCore.Http.BadHttpRequestException ex)
794
return
ConnectionEndReason
.InvalidHttpVersion;
798
return
ConnectionEndReason
.InvalidRequestLine;
811
return
ConnectionEndReason
.InvalidRequestHeaders;
813
return
ConnectionEndReason
.MaxRequestHeadersTotalSizeExceeded;
815
return
ConnectionEndReason
.MaxRequestHeaderCountExceeded;
817
return
ConnectionEndReason
.TlsNotSupported;
819
return
ConnectionEndReason
.UnexpectedEndOfRequestContent;
823
return
ConnectionEndReason
.OtherError;
834
var
reason = GetConnectionEndReason(ex);
Internal\Http\Http1ContentLengthMessageBody.cs (1)
249
_context.DisableKeepAlive(
ConnectionEndReason
.MaxRequestBodySizeExceeded);
Internal\Http\Http1MessageBody.cs (5)
75
_context.StopProcessingNextRequest(
ConnectionEndReason
.InvalidBodyReaderState);
110
_context.StopProcessingNextRequest(
ConnectionEndReason
.InvalidBodyReaderState);
120
_context.DisableKeepAlive(
ConnectionEndReason
.MaxRequestBodySizeExceeded);
210
KestrelMetrics.AddConnectionEndReason(context.MetricsContext,
ConnectionEndReason
.InvalidRequestHeaders);
231
KestrelMetrics.AddConnectionEndReason(_context.MetricsContext,
ConnectionEndReason
.UnexpectedEndOfRequestContent);
Internal\Http\Http1OutputProducer.cs (1)
461
public void Abort(ConnectionAbortedException error,
ConnectionEndReason
reason)
Internal\Http\HttpProtocol.cs (9)
669
DisableKeepAlive(
ConnectionEndReason
.RequestNoKeepAlive);
870
DisableKeepAlive(
ConnectionEndReason
.ResponseContentLengthMismatch);
923
DisableKeepAlive(
ConnectionEndReason
.ResponseContentLengthMismatch);
1042
DisableKeepAlive(
ConnectionEndReason
.ErrorAfterStartingResponse);
1149
DisableKeepAlive(
ConnectionEndReason
.ResponseNoKeepAlive);
1160
DisableKeepAlive(
ConnectionEndReason
.ResponseNoKeepAlive);
1196
DisableKeepAlive(
ConnectionEndReason
.ResponseNoKeepAlive);
1226
DisableKeepAlive(
ConnectionEndReason
.ResponseNoKeepAlive);
1421
internal virtual void DisableKeepAlive(
ConnectionEndReason
reason)
Internal\Http\IHttpOutputAborter.cs (1)
10
void Abort(ConnectionAbortedException abortReason,
ConnectionEndReason
reason);
Internal\Http2\FlowControl\InputFlowControl.cs (1)
56
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorFlowControlWindowExceeded, Http2ErrorCode.FLOW_CONTROL_ERROR,
ConnectionEndReason
.FlowControlWindowExceeded);
Internal\Http2\Http2Connection.cs (63)
143
private
ConnectionEndReason
_gracefulCloseReason;
229
SetConnectionErrorCode(hasActiveStreams ?
ConnectionEndReason
.ConnectionReset :
ConnectionEndReason
.TransportCompleted, Http2ErrorCode.NO_ERROR);
235
private void SetConnectionErrorCode(
ConnectionEndReason
reason, Http2ErrorCode errorCode)
242
public void Abort(ConnectionAbortedException ex,
ConnectionEndReason
reason)
247
public void Abort(ConnectionAbortedException ex, Http2ErrorCode errorCode,
ConnectionEndReason
reason)
258
public void StopProcessingNextRequest(
ConnectionEndReason
reason)
264
Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestHeadersTimeout), Http2ErrorCode.INTERNAL_ERROR,
ConnectionEndReason
.RequestHeadersTimeout);
272
Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestBodyTimeout), Http2ErrorCode.INTERNAL_ERROR,
ConnectionEndReason
.MinRequestBodyDataRate);
275
public void StopProcessingNextRequest(bool serverInitiated,
ConnectionEndReason
reason)
290
var
reason =
ConnectionEndReason
.Unset;
301
reason =
ConnectionEndReason
.TransportCompleted;
361
reason =
ConnectionEndReason
.TransportCompleted;
378
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorKeepAliveTimeout, Http2ErrorCode.INTERNAL_ERROR,
ConnectionEndReason
.KeepAliveTimeout);
396
reason =
ConnectionEndReason
.ConnectionReset;
400
reason =
ConnectionEndReason
.TransportCompleted;
409
reason =
ConnectionEndReason
.IOError;
430
reason =
ConnectionEndReason
.ErrorReadingHeaders;
437
reason =
ConnectionEndReason
.OtherError;
513
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorMinTlsVersion(tlsFeature.Protocol), Http2ErrorCode.INADEQUATE_SECURITY,
ConnectionEndReason
.InsufficientTlsVersion);
598
SetConnectionErrorCode(
ConnectionEndReason
.InvalidHttpVersion, Http2ErrorCode.PROTOCOL_ERROR);
613
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorInvalidPreface, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidHandshake);
685
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdEven(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidStreamId);
695
Http2FrameType.PUSH_PROMISE => throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorPushPromiseReceived, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.UnexpectedFrame),
718
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorPaddingTooLong(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidDataPadding);
740
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamHalfClosedRemote(_incomingFrame.Type, stream.StreamId), Http2ErrorCode.STREAM_CLOSED,
ConnectionEndReason
.FrameAfterStreamClose);
757
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamClosed(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.STREAM_CLOSED,
ConnectionEndReason
.UnknownStream);
762
return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamAborted(_incomingFrame.Type, stream.StreamId), Http2ErrorCode.STREAM_CLOSED,
ConnectionEndReason
.FrameAfterStreamClose);
767
return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdZero(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidStreamId);
772
return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdNotZero(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidStreamId);
778
return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorHeadersInterleaved(_incomingFrame.Type, _incomingFrame.StreamId, _currentHeadersStream.StreamId), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.UnexpectedFrame);
783
return new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorUnexpectedFrameLength(_incomingFrame.Type, expectedLength), Http2ErrorCode.FRAME_SIZE_ERROR,
ConnectionEndReason
.InvalidFrameLength);
800
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorPaddingTooLong(_incomingFrame.Type), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidDataPadding);
805
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamSelfDependency(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.StreamSelfDependency);
825
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamHalfClosedRemote(_incomingFrame.Type, stream.StreamId), Http2ErrorCode.STREAM_CLOSED,
ConnectionEndReason
.FrameAfterStreamClose);
831
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorHeadersWithTrailersNoEndStream, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.MissingStreamEnd);
850
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamClosed(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.STREAM_CLOSED,
ConnectionEndReason
.InvalidStreamId);
928
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamSelfDependency(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.StreamSelfDependency);
995
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorSettingsAckLengthNotZero, Http2ErrorCode.FRAME_SIZE_ERROR,
ConnectionEndReason
.InvalidFrameLength);
1003
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorSettingsLengthNotMultipleOfSix, Http2ErrorCode.FRAME_SIZE_ERROR,
ConnectionEndReason
.InvalidFrameLength);
1037
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorInitialWindowSizeInvalid, Http2ErrorCode.FLOW_CONTROL_ERROR,
ConnectionEndReason
.InvalidSettings);
1059
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorSettingsParameterOutOfRange(ex.Parameter), errorCode,
ConnectionEndReason
.InvalidSettings);
1110
StopProcessingNextRequest(serverInitiated: false,
ConnectionEndReason
.ClientGoAway);
1147
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorWindowUpdateIncrementZero, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidWindowUpdateSize);
1154
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorWindowUpdateSizeInvalid, Http2ErrorCode.FLOW_CONTROL_ERROR,
ConnectionEndReason
.InvalidWindowUpdateSize);
1184
throw new Http2ConnectionErrorException(CoreStrings.Http2ErrorContinuationWithNoHeaders, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.UnexpectedFrame);
1322
Abort(new ConnectionAbortedException(CoreStrings.Http2ConnectionFaulted), Http2ErrorCode.ENHANCE_YOUR_CALM,
ConnectionEndReason
.StreamResetLimitExceeded);
1324
throw new Http2ConnectionErrorException(CoreStrings.Http2ConnectionFaulted, Http2ErrorCode.ENHANCE_YOUR_CALM,
ConnectionEndReason
.StreamResetLimitExceeded);
1383
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamIdle(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidStreamId);
1439
throw new Http2ConnectionErrorException(CoreStrings.FormatHttp2ErrorStreamClosed(_incomingFrame.Type, _incomingFrame.StreamId), Http2ErrorCode.STREAM_CLOSED,
ConnectionEndReason
.FrameAfterStreamClose);
1583
throw new Http2ConnectionErrorException(CoreStrings.BadRequest_HeadersExceedMaxTotalSize, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.MaxRequestHeadersTotalSizeExceeded);
1645
throw new Http2ConnectionErrorException(bre.Message, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.MaxRequestHeaderCountExceeded);
1650
throw new Http2ConnectionErrorException(bre.Message, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1654
throw new Http2ConnectionErrorException(CoreStrings.BadRequest_MalformedRequestInvalidHeaders, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1665
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorConnectionSpecificHeaderField, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1676
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorTrailerNameUppercase, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1680
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorHeaderNameUppercase, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1709
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorPseudoHeaderFieldAfterRegularHeaders, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1715
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorTrailersContainPseudoHeaderField, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1724
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorUnknownPseudoHeaderField, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1731
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorResponsePseudoHeaderField, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
1738
throw new Http2ConnectionErrorException(CoreStrings.HttpErrorDuplicatePseudoHeaderField, Http2ErrorCode.PROTOCOL_ERROR,
ConnectionEndReason
.InvalidRequestHeaders);
Internal\Http2\Http2FrameWriter.cs (6)
172
_http2Connection.Abort(ex, Http2ErrorCode.INTERNAL_ERROR,
ConnectionEndReason
.OutputQueueSizeExceeded);
352
const
ConnectionEndReason
reason =
ConnectionEndReason
.InvalidWindowUpdateSize;
559
_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR,
ConnectionEndReason
.ErrorWritingHeaders);
600
_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR,
ConnectionEndReason
.ErrorWritingHeaders);
1131
_http2Connection.Abort(new ConnectionAbortedException("HTTP/2 connection exceeded the outgoing flow control maximum queue size."), Http2ErrorCode.INTERNAL_ERROR,
ConnectionEndReason
.FlowControlQueueSizeExceeded);
Internal\Http2\Http2OutputProducer.cs (1)
251
void IHttpOutputAborter.Abort(ConnectionAbortedException abortReason,
ConnectionEndReason
reason)
Internal\Http3\Http3Connection.cs (21)
48
private
ConnectionEndReason
_gracefulCloseReason;
107
public void StopProcessingNextRequest(
ConnectionEndReason
reason)
110
public void StopProcessingNextRequest(bool serverInitiated,
ConnectionEndReason
reason)
157
public void Abort(ConnectionAbortedException ex,
ConnectionEndReason
reason)
162
public void Abort(ConnectionAbortedException ex, Http3ErrorCode errorCode,
ConnectionEndReason
reason)
244
connection.OnStreamConnectionError(new Http3ConnectionErrorException(CoreStrings.Http3ErrorControlStreamClosed, Http3ErrorCode.ClosedCriticalStream,
ConnectionEndReason
.ClosedCriticalStream));
322
OnStreamConnectionError(new Http3ConnectionErrorException(CoreStrings.ConnectionTimedBecauseResponseMininumDataRateNotSatisfied, Http3ErrorCode.InternalError,
ConnectionEndReason
.MinResponseDataRate));
345
ConnectionEndReason
reason =
ConnectionEndReason
.Unset;
469
reason =
ConnectionEndReason
.ConnectionReset;
479
reason =
ConnectionEndReason
.IOError;
485
reason =
ConnectionEndReason
.OtherError;
496
reason =
ConnectionEndReason
.OtherError;
548
if (reason ==
ConnectionEndReason
.Unset && _gracefulCloseReason !=
ConnectionEndReason
.Unset)
566
Abort(CreateConnectionAbortError(error, clientAbort), Http3ErrorCode.InternalError,
ConnectionEndReason
.OtherError);
727
var connectionError = new Http3ConnectionErrorException(CoreStrings.Http3ControlStreamErrorInitializingOutbound, Http3ErrorCode.ClosedCriticalStream,
ConnectionEndReason
.ClosedCriticalStream);
731
Abort(new ConnectionAbortedException(connectionError.Message, connectionError), connectionError.ErrorCode,
ConnectionEndReason
.ClosedCriticalStream);
897
Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestHeadersTimeout),
ConnectionEndReason
.RequestHeadersTimeout);
905
Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestBodyTimeout),
ConnectionEndReason
.MinRequestBodyDataRate);
913
Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), Http3ErrorCodeOrNoError,
ConnectionEndReason
.TransportCompleted);
Internal\Http3\Http3ConnectionErrorException.cs (2)
10
public Http3ConnectionErrorException(string message, Http3ErrorCode errorCode,
ConnectionEndReason
reason)
18
public
ConnectionEndReason
Reason { get; }
Internal\Http3\Http3ControlStream.cs (8)
205
throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ControlStreamErrorMultipleInboundStreams("control"), Http3ErrorCode.StreamCreationError,
ConnectionEndReason
.StreamCreationError);
214
throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ControlStreamErrorMultipleInboundStreams("encoder"), Http3ErrorCode.StreamCreationError,
ConnectionEndReason
.StreamCreationError);
223
throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ControlStreamErrorMultipleInboundStreams("decoder"), Http3ErrorCode.StreamCreationError,
ConnectionEndReason
.StreamCreationError);
305
throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3ErrorUnsupportedFrameOnControlStream(_incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame,
ConnectionEndReason
.UnexpectedFrame);
324
throw new Http3ConnectionErrorException(CoreStrings.Http3ErrorControlStreamMultipleSettingsFrames, Http3ErrorCode.UnexpectedFrame,
ConnectionEndReason
.UnexpectedFrame);
370
throw new Http3ConnectionErrorException(message, Http3ErrorCode.SettingsError,
ConnectionEndReason
.InvalidSettings);
390
_context.Connection.StopProcessingNextRequest(serverInitiated: false,
ConnectionEndReason
.ClientGoAway);
434
throw new Http3ConnectionErrorException(message, Http3ErrorCode.MissingSettings,
ConnectionEndReason
.InvalidSettings);
Internal\Http3\Http3OutputProducer.cs (1)
110
void IHttpOutputAborter.Abort(ConnectionAbortedException abortReason,
ConnectionEndReason
reason)
Internal\Http3\Http3Stream.cs (5)
763
CoreStrings.FormatHttp3ErrorUnsupportedFrameOnRequestStream(_incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame,
ConnectionEndReason
.UnexpectedFrame),
766
CoreStrings.FormatHttp3ErrorUnsupportedFrameOnServer(_incomingFrame.FormattedType), Http3ErrorCode.UnexpectedFrame,
ConnectionEndReason
.UnexpectedFrame),
784
throw new Http3ConnectionErrorException(CoreStrings.FormatHttp3StreamErrorFrameReceivedAfterTrailers(Http3Formatting.ToFormattedType(Http3FrameType.Headers)), Http3ErrorCode.UnexpectedFrame,
ConnectionEndReason
.UnexpectedFrame);
883
throw new Http3ConnectionErrorException(CoreStrings.Http3StreamErrorDataReceivedBeforeHeaders, Http3ErrorCode.UnexpectedFrame,
ConnectionEndReason
.UnexpectedFrame);
891
throw new Http3ConnectionErrorException(message, Http3ErrorCode.UnexpectedFrame,
ConnectionEndReason
.UnexpectedFrame);
Internal\HttpConnection.cs (6)
114
using var shutdownRegistration = connectionLifetimeNotificationFeature?.ConnectionClosedRequested.Register(state => ((HttpConnection)state!).StopProcessingNextRequest(
ConnectionEndReason
.GracefulAppShutdown), this);
153
private void StopProcessingNextRequest(
ConnectionEndReason
reason)
191
private void Abort(ConnectionAbortedException ex,
ConnectionEndReason
reason)
281
_requestProcessor!.StopProcessingNextRequest(
ConnectionEndReason
.KeepAliveTimeout);
291
Abort(new ConnectionAbortedException(CoreStrings.ConnectionTimedBecauseResponseMininumDataRateNotSatisfied),
ConnectionEndReason
.MinResponseDataRate);
295
Abort(new ConnectionAbortedException(CoreStrings.ConnectionTimedOutByServer),
ConnectionEndReason
.ServerTimeout);
Internal\Infrastructure\ConnectionMetricsContext.cs (1)
18
public
ConnectionEndReason
? ConnectionEndReason { get; set; }
Internal\Infrastructure\KestrelMetrics.cs (58)
149
AddConnectionEndReason(metricsContext,
ConnectionEndReason
.MaxConcurrentConnectionsExceeded);
420
public static void AddConnectionEndReason(IConnectionMetricsTagsFeature? feature,
ConnectionEndReason
reason)
422
Debug.Assert(reason !=
ConnectionEndReason
.Unset);
433
public static void AddConnectionEndReason(ConnectionMetricsContext? context,
ConnectionEndReason
reason, bool overwrite = false)
435
Debug.Assert(reason !=
ConnectionEndReason
.Unset);
459
internal static string? GetErrorType(
ConnectionEndReason
reason)
465
internal static bool TryGetErrorType(
ConnectionEndReason
reason, [NotNullWhen(true)]out string? errorTypeValue)
469
ConnectionEndReason
.Unset => null, // Not an error
470
ConnectionEndReason
.ClientGoAway => null, // Not an error
471
ConnectionEndReason
.TransportCompleted => null, // Not an error
472
ConnectionEndReason
.GracefulAppShutdown => null, // Not an error
473
ConnectionEndReason
.RequestNoKeepAlive => null, // Not an error
474
ConnectionEndReason
.ResponseNoKeepAlive => null, // Not an error
475
ConnectionEndReason
.ErrorAfterStartingResponse => "error_after_starting_response",
476
ConnectionEndReason
.ConnectionReset => "connection_reset",
477
ConnectionEndReason
.FlowControlWindowExceeded => "flow_control_window_exceeded",
478
ConnectionEndReason
.KeepAliveTimeout => "keep_alive_timeout",
479
ConnectionEndReason
.InsufficientTlsVersion => "insufficient_tls_version",
480
ConnectionEndReason
.InvalidHandshake => "invalid_handshake",
481
ConnectionEndReason
.InvalidStreamId => "invalid_stream_id",
482
ConnectionEndReason
.FrameAfterStreamClose => "frame_after_stream_close",
483
ConnectionEndReason
.UnknownStream => "unknown_stream",
484
ConnectionEndReason
.UnexpectedFrame => "unexpected_frame",
485
ConnectionEndReason
.InvalidFrameLength => "invalid_frame_length",
486
ConnectionEndReason
.InvalidDataPadding => "invalid_data_padding",
487
ConnectionEndReason
.InvalidRequestHeaders => "invalid_request_headers",
488
ConnectionEndReason
.StreamResetLimitExceeded => "stream_reset_limit_exceeded",
489
ConnectionEndReason
.InvalidWindowUpdateSize => "invalid_window_update_size",
490
ConnectionEndReason
.StreamSelfDependency => "stream_self_dependency",
491
ConnectionEndReason
.InvalidSettings => "invalid_settings",
492
ConnectionEndReason
.MissingStreamEnd => "missing_stream_end",
493
ConnectionEndReason
.MaxFrameLengthExceeded => "max_frame_length_exceeded",
494
ConnectionEndReason
.ErrorReadingHeaders => "error_reading_headers",
495
ConnectionEndReason
.ErrorWritingHeaders => "error_writing_headers",
496
ConnectionEndReason
.OtherError => "other_error",
497
ConnectionEndReason
.InvalidHttpVersion => "invalid_http_version",
498
ConnectionEndReason
.RequestHeadersTimeout => "request_headers_timeout",
499
ConnectionEndReason
.MinRequestBodyDataRate => "min_request_body_data_rate",
500
ConnectionEndReason
.MinResponseDataRate => "min_response_data_rate",
501
ConnectionEndReason
.FlowControlQueueSizeExceeded => "flow_control_queue_size_exceeded",
502
ConnectionEndReason
.OutputQueueSizeExceeded => "output_queue_size_exceeded",
503
ConnectionEndReason
.ClosedCriticalStream => "closed_critical_stream",
504
ConnectionEndReason
.AbortedByApp => "aborted_by_app",
505
ConnectionEndReason
.WriteCanceled => "write_canceled",
506
ConnectionEndReason
.InvalidBodyReaderState => "invalid_body_reader_state",
507
ConnectionEndReason
.ServerTimeout => "server_timeout",
508
ConnectionEndReason
.StreamCreationError => "stream_creation_error",
509
ConnectionEndReason
.IOError => "io_error",
510
ConnectionEndReason
.AppShutdownTimeout => "app_shutdown_timeout",
511
ConnectionEndReason
.TlsHandshakeFailed => "tls_handshake_failed",
512
ConnectionEndReason
.InvalidRequestLine => "invalid_request_line",
513
ConnectionEndReason
.TlsNotSupported => "tls_not_supported",
514
ConnectionEndReason
.MaxRequestBodySizeExceeded => "max_request_body_size_exceeded",
515
ConnectionEndReason
.UnexpectedEndOfRequestContent => "unexpected_end_of_request_content",
516
ConnectionEndReason
.MaxConcurrentConnectionsExceeded => "max_concurrent_connections_exceeded",
517
ConnectionEndReason
.MaxRequestHeadersTotalSizeExceeded => "max_request_headers_total_size_exceeded",
518
ConnectionEndReason
.MaxRequestHeaderCountExceeded => "max_request_header_count_exceeded",
519
ConnectionEndReason
.ResponseContentLengthMismatch => "response_content_length_mismatch",
Internal\Infrastructure\PipeWriterHelpers\TimingPipeFlusher.cs (1)
95
outputAborter.Abort(new ConnectionAbortedException(CoreStrings.ConnectionOrStreamAbortedByCancellationToken, ex),
ConnectionEndReason
.WriteCanceled);
Internal\Infrastructure\TransportConnectionManager.cs (1)
83
ConnectionEndReason
.AppShutdownTimeout, overwrite: true);
Internal\IRequestProcessor.cs (2)
12
void StopProcessingNextRequest(
ConnectionEndReason
reason);
17
void Abort(ConnectionAbortedException ex,
ConnectionEndReason
reason);
Middleware\HttpsConnectionMiddleware.cs (1)
244
KestrelMetrics.AddConnectionEndReason(metricsTagsFeature,
ConnectionEndReason
.TlsHandshakeFailed);
src\Shared\ServerInfrastructure\Http2\Http2ConnectionErrorException.cs (2)
10
public Http2ConnectionErrorException(string message, Http2ErrorCode errorCode,
ConnectionEndReason
reason)
18
public
ConnectionEndReason
Reason { get; }
src\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (2)
54
throw new Http2ConnectionErrorException(SharedStrings.FormatHttp2ErrorFrameOverLimit(payloadLength, maxFrameSize), Http2ErrorCode.FRAME_SIZE_ERROR,
ConnectionEndReason
.MaxFrameLengthExceeded);
86
SharedStrings.FormatHttp2ErrorUnexpectedFrameLength(frame.Type, expectedLength: extendedHeaderLength), Http2ErrorCode.FRAME_SIZE_ERROR,
ConnectionEndReason
.InvalidFrameLength);