changed to slice.
This commit is contained in:
parent
85ecea7722
commit
d0bfb56d2e
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
@ -66,17 +67,16 @@ namespace Jellyfin.Server.Middleware
|
||||||
|
|
||||||
foreach (var pair in queryString)
|
foreach (var pair in queryString)
|
||||||
{
|
{
|
||||||
var section = pair.ToString();
|
var i = pair.IndexOf('=');
|
||||||
var i = section.IndexOf('=', System.StringComparison.Ordinal);
|
|
||||||
|
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
{
|
{
|
||||||
// encoded is an equals.
|
// encoded is an equals.
|
||||||
pairs.Add(section, new StringValues(string.Empty));
|
pairs.Add(pair[0..i].ToString(), new StringValues(string.Empty));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
pairs.Add(section[0..i], new StringValues(section[(i + 1)..]));
|
pairs.Add(pair[0..i].ToString(), new StringValues(pair[(i + 1)..].ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
_store = new QueryCollection(pairs);
|
_store = new QueryCollection(pairs);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user