From: Panagiotis Kanavos Date: Mon, 2 Apr 2012 08:49:36 +0000 (+0300) Subject: Fixed HttpWebRequest.DefaultMaximumErrorResponseLength value that was causing problems. X-Git-Url: https://code.grnet.gr/git/pithos-ms-client/commitdiff_plain/09a3b4e239f811ddf3012ec436530e53ff54b349 Fixed HttpWebRequest.DefaultMaximumErrorResponseLength value that was causing problems. --- diff --git a/trunk/Pithos.Network/RestClient.cs b/trunk/Pithos.Network/RestClient.cs index 5566c12..d610a15 100644 --- a/trunk/Pithos.Network/RestClient.cs +++ b/trunk/Pithos.Network/RestClient.cs @@ -97,7 +97,9 @@ namespace Pithos.Network 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; + //Any value above 2^21-1 will result in an empty response. + //-1 essentially ignores the maximum length + HttpWebRequest.DefaultMaximumErrorResponseLength = -1; } @@ -108,7 +110,10 @@ namespace Pithos.Network throw new ArgumentNullException("other"); Contract.EndContractBlock(); - HttpWebRequest.DefaultMaximumErrorResponseLength = 16 * 1024 * 1024; + //The maximum error response must be large because missing server hashes are return as a Conflivt (409) error response + //Any value above 2^21-1 will result in an empty response. + //-1 essentially ignores the maximum length + HttpWebRequest.DefaultMaximumErrorResponseLength = -1; CopyHeaders(other); Timeout = other.Timeout;