aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/SocketSharp/RequestMono.cs
diff options
context:
space:
mode:
authorClaus Vium <clausvium@gmail.com>2019-03-05 19:20:28 +0100
committerClaus Vium <clausvium@gmail.com>2019-03-05 19:20:28 +0100
commit78742b8e4c658b1f02c9c040b8abb8ee5742bed4 (patch)
tree6ee8afb5b09e9ee85de83fbe231786b9759a9837 /Emby.Server.Implementations/SocketSharp/RequestMono.cs
parent318e0d4a2449baff806afb4ee22dc0f4021ca180 (diff)
Switch to HeaderNames instead of hardcoded strings (and other header related fixes)
Diffstat (limited to 'Emby.Server.Implementations/SocketSharp/RequestMono.cs')
-rw-r--r--Emby.Server.Implementations/SocketSharp/RequestMono.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/SocketSharp/RequestMono.cs b/Emby.Server.Implementations/SocketSharp/RequestMono.cs
index f73adc5ff..82bcf2f04 100644
--- a/Emby.Server.Implementations/SocketSharp/RequestMono.cs
+++ b/Emby.Server.Implementations/SocketSharp/RequestMono.cs
@@ -7,6 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using MediaBrowser.Model.Services;
using Microsoft.Extensions.Primitives;
+using Microsoft.Net.Http.Headers;
namespace Emby.Server.Implementations.SocketSharp
{
@@ -114,9 +115,9 @@ namespace Emby.Server.Implementations.SocketSharp
return form;
}
- public string Accept => StringValues.IsNullOrEmpty(request.Headers["Accept"]) ? null : request.Headers["Accept"].ToString();
+ public string Accept => StringValues.IsNullOrEmpty(request.Headers[HeaderNames.Accept]) ? null : request.Headers[HeaderNames.Accept].ToString();
- public string Authorization => StringValues.IsNullOrEmpty(request.Headers["Authorization"]) ? null : request.Headers["Authorization"].ToString();
+ public string Authorization => StringValues.IsNullOrEmpty(request.Headers[HeaderNames.Authorization]) ? null : request.Headers[HeaderNames.Authorization].ToString();
protected bool validate_form { get; set; }
protected bool checked_form { get; set; }