aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-02-13 17:28:04 +0100
committerBond-009 <bond.009@outlook.com>2019-02-16 00:43:56 +0100
commit46897aab4f85bd2ea50e0ff1ef57c0cfa8f48c67 (patch)
treeeca2f84bb47e013d081e88fe580e2041504c1d6b /Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
parent892787cb1a72303ffd514971d0d5ea4c30f2dcd1 (diff)
More warnings
Diffstat (limited to 'Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs')
-rw-r--r--Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs b/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
index c5fdf6a3b..a19ea6bf7 100644
--- a/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
+++ b/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Text;
using Emby.Server.Implementations.HttpServer;
@@ -69,9 +70,11 @@ namespace Jellyfin.Server.SocketSharp
public string UserHostAddress => request.UserHostAddress;
- public string XForwardedFor => string.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"];
+ public string XForwardedFor
+ => string.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"];
- public int? XForwardedPort => string.IsNullOrEmpty(request.Headers["X-Forwarded-Port"]) ? (int?)null : int.Parse(request.Headers["X-Forwarded-Port"]);
+ public int? XForwardedPort
+ => string.IsNullOrEmpty(request.Headers["X-Forwarded-Port"]) ? (int?)null : int.Parse(request.Headers["X-Forwarded-Port"], CultureInfo.InvariantCulture);
public string XForwardedProtocol => string.IsNullOrEmpty(request.Headers["X-Forwarded-Proto"]) ? null : request.Headers["X-Forwarded-Proto"];