Преглед на файлове

disable http compression

Luke Pulverenti преди 9 години
родител
ревизия
53f2d7cd70
променени са 1 файла, в които са добавени 11 реда и са изтрити 1 реда
  1. 11 1
      MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs

+ 11 - 1
MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs

@@ -258,7 +258,17 @@ namespace MediaBrowser.Common.Implementations.Security
 
                 try
                 {
-                    using (var json = await _httpClient.Post(MBValidateUrl, data, CancellationToken.None).ConfigureAwait(false))
+                    var options = new HttpRequestOptions
+                    {
+                        Url = MBValidateUrl,
+
+                        // Seeing block length errors
+                        EnableHttpCompression = false
+                    };
+
+                    options.SetPostData(data);
+
+                    using (var json = (await _httpClient.Post(options).ConfigureAwait(false)).Content)
                     {
                         reg = _jsonSerializer.DeserializeFromStream<RegRecord>(json);
                         success = true;