111 references to RequestRejectionReason
Microsoft.AspNetCore.Server.Kestrel.Core (111)
BadHttpRequestException.cs (3)
16internal BadHttpRequestException(string message, int statusCode, RequestRejectionReason reason) 20internal BadHttpRequestException(string message, int statusCode, RequestRejectionReason reason, HttpMethod? requiredMethod) 38internal RequestRejectionReason Reason { get; }
Internal\Http\Http1ChunkedEncodingMessageBody.cs (4)
110KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTimeout); 345KestrelBadHttpRequestException.Throw(RequestRejectionReason.BadChunkSizeData); 441KestrelBadHttpRequestException.Throw(RequestRejectionReason.BadChunkSuffix); 500KestrelBadHttpRequestException.Throw(RequestRejectionReason.BadChunkSizeData);
Internal\Http\Http1Connection.cs (35)
232KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestLineTooLong); 275KestrelBadHttpRequestException.Throw(RequestRejectionReason.HeadersExceedMaxTotalSize); 468KestrelBadHttpRequestException.Throw(RequestRejectionReason.ConnectMethodRequired); 512KestrelBadHttpRequestException.Throw(RequestRejectionReason.OptionsMethodRequired); 612KestrelBadHttpRequestException.Throw(RequestRejectionReason.MissingHostHeader); 616KestrelBadHttpRequestException.Throw(RequestRejectionReason.MultipleHostHeaders); 626KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 637KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 662KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 671KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 724KestrelBadHttpRequestException.Throw(RequestRejectionReason.MalformedRequestInvalidHeaders); 752KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidRequestLine); 755KestrelBadHttpRequestException.Throw(RequestRejectionReason.MalformedRequestInvalidHeaders); 770KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestHeadersTimeout); 793case RequestRejectionReason.UnrecognizedHTTPVersion: 795case RequestRejectionReason.InvalidRequestLine: 796case RequestRejectionReason.RequestLineTooLong: 797case RequestRejectionReason.InvalidRequestTarget: 799case RequestRejectionReason.InvalidRequestHeadersNoCRLF: 800case RequestRejectionReason.InvalidRequestHeader: 801case RequestRejectionReason.InvalidContentLength: 802case RequestRejectionReason.MultipleContentLengths: 803case RequestRejectionReason.MalformedRequestInvalidHeaders: 804case RequestRejectionReason.InvalidCharactersInHeaderName: 805case RequestRejectionReason.LengthRequiredHttp10: 806case RequestRejectionReason.OptionsMethodRequired: 807case RequestRejectionReason.ConnectMethodRequired: 808case RequestRejectionReason.MissingHostHeader: 809case RequestRejectionReason.MultipleHostHeaders: 810case RequestRejectionReason.InvalidHostHeader: 812case RequestRejectionReason.HeadersExceedMaxTotalSize: 814case RequestRejectionReason.TooManyHeaders: 816case RequestRejectionReason.TlsOverHttpError: 818case RequestRejectionReason.UnexpectedEndOfRequestContent: 837if (ex.Reason == RequestRejectionReason.UnrecognizedHTTPVersion)
Internal\Http\Http1ContentLengthMessageBody.cs (6)
46KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTimeout); 85KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTimeout); 132KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTimeout); 250KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTooLarge, maxRequestBodySize.GetValueOrDefault().ToString(CultureInfo.InvariantCulture)); 272KestrelBadHttpRequestException.Throw(RequestRejectionReason.UnexpectedEndOfRequestContent); 277KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTimeout);
Internal\Http\Http1MessageBody.cs (4)
121KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTooLarge, maxRequestBodySize.ToString(CultureInfo.InvariantCulture)); 166KestrelBadHttpRequestException.Throw(RequestRejectionReason.FinalTransferCodingNotChunked, transferEncoding); 211KestrelBadHttpRequestException.Throw(RequestRejectionReason.LengthRequiredHttp10, context.Method); 240KestrelBadHttpRequestException.Throw(RequestRejectionReason.UnexpectedEndOfRequestContent);
Internal\Http\HttpParser.cs (6)
248KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidRequestHeadersNoCRLF); 582RequestRejectionReason.TlsOverHttpError : 583RequestRejectionReason.InvalidRequestLine, 589=> throw GetInvalidRequestException(RequestRejectionReason.InvalidRequestHeader, headerLine); 593=> throw GetInvalidRequestException(RequestRejectionReason.UnrecognizedHTTPVersion, version[..^1]); 596private BadHttpRequestException GetInvalidRequestException(RequestRejectionReason reason, ReadOnlySpan<byte> headerLine)
Internal\Http\HttpProtocol.cs (2)
563KestrelBadHttpRequestException.Throw(RequestRejectionReason.TooManyHeaders); 1397RequestRejectionReason.InvalidRequestTarget,
Internal\Http\HttpRequestHeaders.cs (5)
87KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidContentLength, value); 98KestrelBadHttpRequestException.Throw(RequestRejectionReason.MultipleContentLengths); 105KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidContentLength, value.GetRequestHeaderString(HeaderNames.ContentLength, EncodingSelector, checkForNewlineChars: false)); 117KestrelBadHttpRequestException.Throw(RequestRejectionReason.MultipleContentLengths); 129KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidContentLength, value.GetRequestHeaderString(HeaderNames.ContentLength, EncodingSelector, checkForNewlineChars: false));
Internal\Http\MessageBody.cs (1)
200KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTooLarge, maxRequestBodySize.ToString(CultureInfo.InvariantCulture));
Internal\Http2\Http2Connection.cs (2)
263Log.ConnectionBadRequest(ConnectionId, KestrelBadHttpRequestException.GetException(RequestRejectionReason.RequestHeadersTimeout)); 1643catch (BadHttpRequestException bre) when (bre.Reason == RequestRejectionReason.TooManyHeaders)
Internal\Http2\Http2MessageBody.cs (1)
40KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTooLarge, maxRequestBodySize.GetValueOrDefault().ToString(CultureInfo.InvariantCulture));
Internal\Http2\Http2Stream.cs (2)
223KestrelBadHttpRequestException.Throw(RequestRejectionReason.HeadersExceedMaxTotalSize); 229KestrelBadHttpRequestException.Throw(RequestRejectionReason.TooManyHeaders);
Internal\Http3\Http3Connection.cs (1)
896Log.ConnectionBadRequest(ConnectionId, KestrelBadHttpRequestException.GetException(RequestRejectionReason.RequestHeadersTimeout));
Internal\Http3\Http3MessageBody.cs (1)
31KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTooLarge, maxRequestBodySize.GetValueOrDefault().ToString(CultureInfo.InvariantCulture));
Internal\Http3\Http3Stream.cs (2)
968KestrelBadHttpRequestException.Throw(RequestRejectionReason.HeadersExceedMaxTotalSize); 974KestrelBadHttpRequestException.Throw(RequestRejectionReason.TooManyHeaders);
Internal\Infrastructure\HttpUtilities.cs (1)
97KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidCharactersInHeaderName);
KestrelBadHttpRequestException.cs (35)
15internal static void Throw(RequestRejectionReason reason) 21internal static void Throw(RequestRejectionReason reason, HttpMethod method) 26internal static BadHttpRequestException GetException(RequestRejectionReason reason) 31case RequestRejectionReason.InvalidRequestHeadersNoCRLF: 34case RequestRejectionReason.InvalidRequestLine: 37case RequestRejectionReason.MalformedRequestInvalidHeaders: 40case RequestRejectionReason.MultipleContentLengths: 43case RequestRejectionReason.UnexpectedEndOfRequestContent: 46case RequestRejectionReason.BadChunkSuffix: 49case RequestRejectionReason.BadChunkSizeData: 52case RequestRejectionReason.ChunkedRequestIncomplete: 55case RequestRejectionReason.InvalidCharactersInHeaderName: 58case RequestRejectionReason.RequestLineTooLong: 61case RequestRejectionReason.HeadersExceedMaxTotalSize: 64case RequestRejectionReason.TooManyHeaders: 67case RequestRejectionReason.RequestHeadersTimeout: 70case RequestRejectionReason.RequestBodyTimeout: 73case RequestRejectionReason.OptionsMethodRequired: 76case RequestRejectionReason.ConnectMethodRequired: 79case RequestRejectionReason.MissingHostHeader: 82case RequestRejectionReason.MultipleHostHeaders: 85case RequestRejectionReason.InvalidHostHeader: 97internal static void Throw(RequestRejectionReason reason, string detail) 103internal static void Throw(RequestRejectionReason reason, StringValues detail) 110internal static BadHttpRequestException GetException(RequestRejectionReason reason, string detail) 115case RequestRejectionReason.TlsOverHttpError: 118case RequestRejectionReason.InvalidRequestLine: 121case RequestRejectionReason.InvalidRequestTarget: 124case RequestRejectionReason.InvalidRequestHeader: 127case RequestRejectionReason.InvalidContentLength: 130case RequestRejectionReason.UnrecognizedHTTPVersion: 133case RequestRejectionReason.FinalTransferCodingNotChunked: 136case RequestRejectionReason.LengthRequiredHttp10: 139case RequestRejectionReason.InvalidHostHeader: 142case RequestRejectionReason.RequestBodyTooLarge: