2010-04-07 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 7 Apr 2010 14:11:27 +0000 (14:11 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 7 Apr 2010 14:11:27 +0000 (14:11 -0000)
* ClientAccessPolicy.cs: Fake a "GET" method when applying a
policy to sockets

svn path=/trunk/mcs/; revision=154959

mcs/class/System.Net/System.Net.Policy/ChangeLog
mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs

index cb1a21321d1cc530acebf1263692e8502562422d..9b08904cb21175bc98caed359cc147666780aa34 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-07  Sebastien Pouliot  <sebastien@ximian.com> 
+
+       * ClientAccessPolicy.cs: Fake a "GET" method when applying a 
+       policy to sockets
+
 2010-04-07  Sebastien Pouliot  <sebastien@ximian.com>
 
        * BaseDomainPolicy.cs: Abstract-fy IsAllowed(WebRequest) and 
index 318cb0e4b35839fec8710764d399a77157523f54..3e223a911a093b14dd405b2ca67cb4cbe5d768a2 100644 (file)
@@ -74,7 +74,8 @@ namespace System.Net.Policy {
                        foreach (AccessPolicy policy in AccessPolicyList) {
                                // does something allow our URI in this policy ?
                                foreach (AllowFrom af in policy.AllowedServices) {
-                                       if (af.IsAllowed (ApplicationUri, null, null)) {
+                                       // fake "GET" as method as this does not apply to sockets
+                                       if (af.IsAllowed (ApplicationUri, "GET", null)) {
                                                // if so, is our request port allowed ?
                                                if (policy.PortAllowed (endpoint.Port))
                                                        return true;