From 9f06eb781f5992496a7b1a59fb55b0aa6520261f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 31 Mar 2013 13:39:28 -0400 Subject: fixes #97 and creates a library dictionary cache to avoid FindById recursion --- .../HttpClientManager/HttpClientManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs') diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index 0e9696648..8508fcdf5 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -1,4 +1,5 @@ -using System.Net.Http.Headers; +using System.Globalization; +using System.Net.Http.Headers; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.IO; using MediaBrowser.Common.Net; @@ -216,6 +217,8 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager return GetTempFile(options, tempFile, 0); } + protected static readonly CultureInfo UsCulture = new CultureInfo("en-US"); + /// /// Gets the temp file. /// @@ -278,7 +281,7 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager } else { - var length = long.Parse(string.Join(string.Empty, lengthValues.ToArray())); + var length = long.Parse(string.Join(string.Empty, lengthValues.ToArray()), UsCulture); using (var stream = ProgressStream.CreateReadProgressStream(await response.Content.ReadAsStreamAsync().ConfigureAwait(false), options.Progress.Report, length)) { -- cgit v1.2.3