Skip to content

Commit 0ba3a52

Browse files
committed
Unsafe call through to safe exception
1 parent 108529f commit 0ba3a52

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,7 @@ private unsafe void RejectUnknownVersion(byte* version, int length)
522522

523523
[MethodImpl(MethodImplOptions.NoInlining)]
524524
private unsafe BadHttpRequestException GetInvalidRequestException(RequestRejectionReason reason, byte* detail, int length)
525-
=> KestrelBadHttpRequestException.GetException(
526-
reason,
527-
_showErrorDetails
528-
? new ReadOnlySpan<byte>(detail, length).GetAsciiStringEscaped(Constants.MaxExceptionDetailSize)
529-
: string.Empty);
525+
=> GetInvalidRequestException(reason, new ReadOnlySpan<byte>(detail, length));
530526

531527
[MethodImpl(MethodImplOptions.NoInlining)]
532528
private BadHttpRequestException GetInvalidRequestException(RequestRejectionReason reason, ReadOnlySpan<byte> headerLine)

0 commit comments

Comments
 (0)