Update HttpRequest.cs

This commit is contained in:
uwaa 2024-11-13 01:39:23 +00:00
parent 38251d1328
commit 4903b6320a

View file

@ -100,8 +100,7 @@ public sealed class HttpRequest
throw new RequestParseException("Invalid initial header");
//Method
HttpMethod method;
if (!Enum.TryParse(parts[0], true, out method))
if (!Enum.TryParse(parts[0], true, out HttpMethod method))
throw new RequestParseException("Unknown HTTP method");
Method = method;