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:
authorMarek Habersack <grendel@twistedcode.net>2010-07-01 11:59:28 +0400
committerMarek Habersack <grendel@twistedcode.net>2010-07-01 11:59:28 +0400
commit51b5c3831207b08409f3d4a92f695d9301ff608f (patch)
treeb4c901bf68002ece5ba4a657e632481998b0803c /mcs/class
parent778f4c06c4f55665e38d6e26b6b0e6b8ebf76e4d (diff)
Backport of r159758
svn path=/branches/mono-2-6/mcs/; revision=159759
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System/System.Net/ChangeLog5
-rw-r--r--mcs/class/System/System.Net/WebRequest.cs13
2 files changed, 12 insertions, 6 deletions
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index 92865300cfa..9c90c43e4f2 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-01 Marek Habersack <mhabersack@novell.com>
+
+ * WebRequest.cs: DefaultCachePolicy and CachePolicy return a
+ NoCacheNoStore policy in all cases now. Workaround for bug #583934
+
2010-06-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
* IPAddress.cs: verify the last IPv4 digit too.
diff --git a/mcs/class/System/System.Net/WebRequest.cs b/mcs/class/System/System.Net/WebRequest.cs
index 43ddcaaffd3..772323a5530 100644
--- a/mcs/class/System/System.Net/WebRequest.cs
+++ b/mcs/class/System/System.Net/WebRequest.cs
@@ -57,6 +57,7 @@ namespace System.Net
#if NET_2_0
static bool isDefaultWebProxySet;
static IWebProxy defaultWebProxy;
+ static RequestCachePolicy defaultCachePolicy;
#endif
// Constructors
@@ -69,6 +70,9 @@ namespace System.Net
AddPrefix ("file", typeof (FileWebRequestCreator));
AddPrefix ("ftp", typeof (FtpRequestCreator));
#else
+ #if NET_2_0
+ defaultCachePolicy = new HttpRequestCachePolicy (HttpRequestCacheLevel.NoCacheNoStore);
+ #endif
#if NET_2_0 && CONFIGURATION_DEP
object cfg = ConfigurationManager.GetSection ("system.net/webRequestModules");
WebRequestModulesSection s = cfg as WebRequestModulesSection;
@@ -114,11 +118,10 @@ namespace System.Net
}
}
+ [MonoTODO ("Implement the caching system. Currently always returns a policy with the NoCacheNoStore level")]
public virtual RequestCachePolicy CachePolicy
{
- get {
- throw GetMustImplement ();
- }
+ get { return DefaultCachePolicy; }
set {
}
}
@@ -147,9 +150,7 @@ namespace System.Net
#if NET_2_0
public static RequestCachePolicy DefaultCachePolicy
{
- get {
- throw GetMustImplement ();
- }
+ get { return defaultCachePolicy; }
set {
throw GetMustImplement ();
}