From f0e96e7ffb69f32c437c95ea8b4291502751319b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20N=C3=A4geli?= Date: Wed, 1 Jul 2026 13:53:08 +0200 Subject: [PATCH] Yield error 505 on unsupported HTTP version --- .../UltraHardened/UltraHardenedParser.FullHeader.ROM.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Glyph11/Parser/UltraHardened/UltraHardenedParser.FullHeader.ROM.cs b/src/Glyph11/Parser/UltraHardened/UltraHardenedParser.FullHeader.ROM.cs index ba14ef1..228bc69 100644 --- a/src/Glyph11/Parser/UltraHardened/UltraHardenedParser.FullHeader.ROM.cs +++ b/src/Glyph11/Parser/UltraHardened/UltraHardenedParser.FullHeader.ROM.cs @@ -4,7 +4,7 @@ namespace Glyph11.Parser.UltraHardened; /// -/// +/// /// public static partial class UltraHardenedParser { @@ -96,7 +96,7 @@ public static bool TryExtractFullHeaderROM( // --- Version --- var versionSpan = requestLine[(secondSpace + 1)..]; if (!ParserConstants.IsValidHttpVersion(versionSpan)) - throw new HttpParseException("Invalid HTTP version."); + throw new HttpParseException("Invalid HTTP version.", 505); request.Version = input.Slice(secondSpace + 1, versionSpan.Length);