Merge branch 'master' of https://code.grnet.gr/git/pithos-ms-client
[pithos-ms-client] / trunk / Pithos.Network / RestClient.cs
index 827b76a..5566c12 100644 (file)
@@ -94,9 +94,10 @@ namespace Pithos.Network
             Contract.Invariant(Headers!=null);    
         }
 
-        public RestClient():base()\r
-        {\r
-            HttpWebRequest.DefaultMaximumErrorResponseLength = 67108864;\r
+        public RestClient():base()
+        {
+            //The maximum error response must be large because missing server hashes are return as a Conflivt (409) error response
+            HttpWebRequest.DefaultMaximumErrorResponseLength = 16*1024*1024;
         }
 
        
@@ -107,6 +108,8 @@ namespace Pithos.Network
                 throw new ArgumentNullException("other");
             Contract.EndContractBlock();
 
+            HttpWebRequest.DefaultMaximumErrorResponseLength = 16 * 1024 * 1024;
+
             CopyHeaders(other);
             Timeout = other.Timeout;
             Retries = other.Retries;