aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2020-11-15 13:48:43 +0100
committerGitHub <noreply@github.com>2020-11-15 13:48:43 +0100
commit7caf1662eca2ea8826f3277e8b9d5c8c782fd03d (patch)
tree526c116a04f01a13202b575e0a923baf6c7e3a48 /Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
parent331c7f84817ae2c6897cc60d16a5d66b27f3f187 (diff)
parentd4e568c8bf1e5312075225c5554eeffb5335fd47 (diff)
Merge pull request #4478 from Bond-009/chararray
Don't allocate single char arrays when possible
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
index e733c9092..fdf2e3908 100644
--- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
+++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
@@ -245,7 +245,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
return null;
}
- var parts = authorizationHeader.Split(new[] { ' ' }, 2);
+ var parts = authorizationHeader.Split(' ', 2);
// There should be at least to parts
if (parts.Length != 2)
@@ -269,11 +269,11 @@ namespace Emby.Server.Implementations.HttpServer.Security
foreach (var item in parts)
{
- var param = item.Trim().Split(new[] { '=' }, 2);
+ var param = item.Trim().Split('=', 2);
if (param.Length == 2)
{
- var value = NormalizeValue(param[1].Trim(new[] { '"' }));
+ var value = NormalizeValue(param[1].Trim('"'));
result[param[0]] = value;
}
}