Skip to content

Commit b64e7bc

Browse files
committed
nit
1 parent be9d686 commit b64e7bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private static ulong GetMaskAsLong(ReadOnlySpan<byte> bytes)
8080
return BinaryPrimitives.ReadUInt64LittleEndian(bytes);
8181
}
8282

83-
// The same as GetAsciiStringNonNullCharacters but throws BadRequest
83+
// The same as GetAsciiString but throws BadRequest for null character
8484
[MethodImpl(MethodImplOptions.AggressiveInlining)]
8585
public static string GetHeaderName(this ReadOnlySpan<byte> span)
8686
{
@@ -107,6 +107,7 @@ public static string GetHeaderName(this ReadOnlySpan<byte> span)
107107
public static string GetAsciiString(this Span<byte> span)
108108
=> StringUtilities.GetAsciiString(span);
109109

110+
// Null checks must be done independently of this method (if required)
110111
public static string GetAsciiOrUTF8String(this ReadOnlySpan<byte> span)
111112
=> StringUtilities.GetAsciiOrUTF8String(span, DefaultRequestHeaderEncoding);
112113

0 commit comments

Comments
 (0)