diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs index 681b08825..edb227c79 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs @@ -127,6 +127,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer EndpointHostConfig.Instance.MetadataRedirectPath = "metadata"; } + protected static readonly CultureInfo UsCulture = new CultureInfo("en-US"); + /// <summary> /// Configures the specified container. /// </summary> @@ -184,7 +186,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer if (hasOptions.Options.TryGetValue("Content-Length", out contentLength) && !string.IsNullOrEmpty(contentLength)) { - var length = long.Parse(contentLength); + var length = long.Parse(contentLength, UsCulture); if (length > 0) { diff --git a/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs b/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs index a355a2db5..24292f0a1 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs @@ -139,11 +139,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer if (!string.IsNullOrEmpty(vals[0])) { - start = long.Parse(vals[0]); + start = long.Parse(vals[0], UsCulture); } if (!string.IsNullOrEmpty(vals[1])) { - end = long.Parse(vals[1]); + end = long.Parse(vals[1], UsCulture); } _requestedRanges.Add(new KeyValuePair<long, long?>(start, end)); |
