remove empty path segmentsss

This commit is contained in:
uwaa 2024-10-28 11:05:39 +00:00
parent d948ab6191
commit 036b34233f

View file

@ -119,7 +119,7 @@ public sealed class HttpServer
await req.ReadAllHeaders();
//Parse path
ArraySegment<string> pathSpl = req.Path.Split('/');
ArraySegment<string> pathSpl = req.Path.Split('/', StringSplitOptions.RemoveEmptyEntries);
if (pathSpl.Count == 0)
pathSpl = new string[] { string.Empty };