Browse Source

[#7599][Web]: Use original uri to compute service point hash.

Use the original request Uri, not the proxy address, to compute
the service point hash.
Martin Baulig 13 years ago
parent
commit
db232608f4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      mcs/class/System/System.Net/ServicePointManager.cs

+ 3 - 1
mcs/class/System/System.Net/ServicePointManager.cs

@@ -303,6 +303,8 @@ namespace System.Net
 				throw new ArgumentNullException ("address");
 
 			RecycleServicePoints ();
+
+			var origAddress = new Uri (address.Scheme + "://" + address.Authority);
 			
 			bool usesProxy = false;
 			bool useConnect = false;
@@ -321,7 +323,7 @@ namespace System.Net
 			
 			ServicePoint sp = null;
 			lock (servicePoints) {
-				SPKey key = new SPKey (address, useConnect);
+				SPKey key = new SPKey (origAddress, useConnect);
 				sp = servicePoints [key] as ServicePoint;
 				if (sp != null)
 					return sp;