From 036b34233fae296f9845efba79c7a2d28a090bdc Mon Sep 17 00:00:00 2001 From: uwaa Date: Mon, 28 Oct 2024 11:05:39 +0000 Subject: [PATCH] remove empty path segmentsss --- MiniHTTP/HttpServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MiniHTTP/HttpServer.cs b/MiniHTTP/HttpServer.cs index 8cab112..90cc6e6 100644 --- a/MiniHTTP/HttpServer.cs +++ b/MiniHTTP/HttpServer.cs @@ -119,7 +119,7 @@ public sealed class HttpServer await req.ReadAllHeaders(); //Parse path - ArraySegment pathSpl = req.Path.Split('/'); + ArraySegment pathSpl = req.Path.Split('/', StringSplitOptions.RemoveEmptyEntries); if (pathSpl.Count == 0) pathSpl = new string[] { string.Empty };