Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-07-09 02:29:33 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-07-09 02:29:33 +0400
commit7365be1f630e5583efd27aaab86762a739f4a0d4 (patch)
tree86a485511dff846803e522996582655eaaf7ec3f /mcs/class
parent6cc3e7d3497bb581fb9a403cc8f921911eb05198 (diff)
Fix the 1.1 build
svn path=/branches/mono-2-6/mcs/; revision=160088
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System/System.Net/WebClient.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs
index ac2dc8d79b4..931ed3f646c 100644
--- a/mcs/class/System/System.Net/WebClient.cs
+++ b/mcs/class/System/System.Net/WebClient.cs
@@ -992,12 +992,14 @@ namespace System.Net
int length = (int) response.ContentLength;
HttpWebRequest wreq = request as HttpWebRequest;
+#if NET_2_0
if (length > -1 && wreq != null && (int) wreq.AutomaticDecompression != 0) {
string content_encoding = ((HttpWebResponse) response).ContentEncoding;
if (((content_encoding == "gzip" && (wreq.AutomaticDecompression & DecompressionMethods.GZip) != 0)) ||
((content_encoding == "deflate" && (wreq.AutomaticDecompression & DecompressionMethods.Deflate) != 0)))
length = -1;
}
+#endif
MemoryStream ms = null;
bool nolength = (length == -1);