fix
This commit is contained in:
parent
036b34233f
commit
2f0d5af790
1 changed files with 7 additions and 6 deletions
|
@ -121,13 +121,14 @@ public sealed class HttpServer
|
|||
//Parse path
|
||||
ArraySegment<string> pathSpl = req.Path.Split('/', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (pathSpl.Count == 0)
|
||||
{
|
||||
pathSpl = new string[] { string.Empty };
|
||||
|
||||
for (int i = 0; i < pathSpl.Count; i++)
|
||||
pathSpl[i] = WebUtility.UrlDecode(pathSpl[i]);
|
||||
|
||||
if (pathSpl.Count > 0 && pathSpl[0].Length == 0)
|
||||
pathSpl = pathSpl.Slice(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < pathSpl.Count; i++)
|
||||
pathSpl[i] = WebUtility.UrlDecode(pathSpl[i]);
|
||||
}
|
||||
|
||||
//Execute
|
||||
response = await Router.GetResponse(req, pathSpl);
|
||||
|
|
Loading…
Reference in a new issue