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)
231KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestLineTooLong); 274KestrelBadHttpRequestException.Throw(RequestRejectionReason.HeadersExceedMaxTotalSize); 467KestrelBadHttpRequestException.Throw(RequestRejectionReason.ConnectMethodRequired); 511KestrelBadHttpRequestException.Throw(RequestRejectionReason.OptionsMethodRequired); 611KestrelBadHttpRequestException.Throw(RequestRejectionReason.MissingHostHeader); 615KestrelBadHttpRequestException.Throw(RequestRejectionReason.MultipleHostHeaders); 625KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 636KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 669KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 678KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidHostHeader, hostText); 731KestrelBadHttpRequestException.Throw(RequestRejectionReason.MalformedRequestInvalidHeaders); 759KestrelBadHttpRequestException.Throw(RequestRejectionReason.InvalidRequestLine); 762KestrelBadHttpRequestException.Throw(RequestRejectionReason.MalformedRequestInvalidHeaders); 777KestrelBadHttpRequestException.Throw(RequestRejectionReason.RequestHeadersTimeout); 800case RequestRejectionReason.UnrecognizedHTTPVersion: 802case RequestRejectionReason.InvalidRequestLine: 803case RequestRejectionReason.RequestLineTooLong: 804case RequestRejectionReason.InvalidRequestTarget: 806case RequestRejectionReason.InvalidRequestHeadersNoCRLF: 807case RequestRejectionReason.InvalidRequestHeader: 808case RequestRejectionReason.InvalidContentLength: 809case RequestRejectionReason.MultipleContentLengths: 810case RequestRejectionReason.MalformedRequestInvalidHeaders: 811case RequestRejectionReason.InvalidCharactersInHeaderName: 812case RequestRejectionReason.LengthRequiredHttp10: 813case RequestRejectionReason.OptionsMethodRequired: 814case RequestRejectionReason.ConnectMethodRequired: 815case RequestRejectionReason.MissingHostHeader: 816case RequestRejectionReason.MultipleHostHeaders: 817case RequestRejectionReason.InvalidHostHeader: 819case RequestRejectionReason.HeadersExceedMaxTotalSize: 821case RequestRejectionReason.TooManyHeaders: 823case RequestRejectionReason.TlsOverHttpError: 825case RequestRejectionReason.UnexpectedEndOfRequestContent: 844if (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: