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