tests and small fix.

This commit is contained in:
BaronGreenback
2021-05-07 14:02:42 +01:00
parent c8061f92be
commit 4f5c9e9504
3 changed files with 62 additions and 2 deletions

View File

@@ -66,7 +66,14 @@ namespace Jellyfin.Server.Middleware
foreach (var pair in queryString)
{
var item = pair.Split('=', System.StringSplitOptions.RemoveEmptyEntries);
pairs.Add(item[0], new StringValues(item.Length == 2 ? item[1] : string.Empty));
if (item.Length > 0)
{
pairs.Add(item[0], new StringValues(item.Length == 2 ? item[1] : string.Empty));
}
else
{
pairs.Add(pair, string.Empty);
}
}
_store = new QueryCollection(pairs);