Skip to content

Commit

Permalink
2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* ServicePointManager.cs: when going through a proxy, use 2 different
	service points depending on the scheme. Fixes bug #75135.


svn path=/branches/mono-1-1-7/mcs/; revision=45361
  • Loading branch information
gonzalop committed Jun 3, 2005
1 parent 8dbf91b commit 3f03ba2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mcs/class/System/System.Net/ServicePointManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ public static ServicePoint FindServicePoint (Uri address, IWebProxy proxy)

ServicePoint sp = null;
lock (servicePoints) {
sp = servicePoints [address] as ServicePoint;
int key = address.GetHashCode () + (int) ((useConnect) ? 1 : 0);
sp = servicePoints [key] as ServicePoint;
if (sp != null)
return sp;

Expand All @@ -218,7 +219,7 @@ public static ServicePoint FindServicePoint (Uri address, IWebProxy proxy)
#endif
sp.UsesProxy = usesProxy;
sp.UseConnect = useConnect;
servicePoints.Add (address, sp);
servicePoints.Add (key, sp);
}

return sp;
Expand Down

0 comments on commit 3f03ba2

Please sign in to comment.