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