Created
October 5, 2016 16:09
-
-
Save mandel-macaque/ef16020ecb19208f468138bdbcea5a4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Foundation/NSUrlSessionHandler.cs b/src/Foundation/NSUrlSessionHandler.cs | |
index a449989..5746b12 100644 | |
--- a/src/Foundation/NSUrlSessionHandler.cs | |
+++ b/src/Foundation/NSUrlSessionHandler.cs | |
@@ -79,6 +79,7 @@ namespace Foundation { | |
configuration.TLSMinimumSupportedProtocol = SslProtocol.Tls_1_1; | |
else if ((sp & SecurityProtocolType.Tls12) != 0) | |
configuration.TLSMinimumSupportedProtocol = SslProtocol.Tls_1_2; | |
+ | |
session = NSUrlSession.FromConfiguration (NSUrlSessionConfiguration.DefaultSessionConfiguration, new NSUrlSessionHandlerDelegate (this), null); | |
inflightRequests = new Dictionary<NSUrlSessionTask, InflightData> (); | |
@@ -139,7 +140,7 @@ namespace Foundation { | |
if (request.Content != null) { | |
stream = await request.Content.ReadAsStreamAsync ().ConfigureAwait (false); | |
headers = headers.Union (request.Content.Headers).ToArray (); | |
- } | |
+ } | |
var nsrequest = new NSMutableUrlRequest { | |
AllowsCellularAccess = true, | |
@@ -151,6 +152,9 @@ namespace Foundation { | |
return acc; | |
}) | |
}; | |
+ | |
+ // disable gzip/deflate | |
+ nsrequest ["Accept-Encoding"] = ""; | |
if (stream != Stream.Null) | |
nsrequest.BodyStream = new WrappedNSInputStream (stream); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment