X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem%2FSystem.Net%2FCookieCollection.cs;h=6752230648890b4baab15c1ec905d1ef58c7fe89;hb=0e3361865d53648229b8700c8d76e6af93f1e062;hp=3a123ef11d268b9d9044f310050d296a182064f6;hpb=b29374fff7841d9f26c13ea96ac5db1161e06d8c;p=mono.git diff --git a/mcs/class/System/System.Net/CookieCollection.cs b/mcs/class/System/System.Net/CookieCollection.cs index 3a123ef11d2..67522306488 100644 --- a/mcs/class/System/System.Net/CookieCollection.cs +++ b/mcs/class/System/System.Net/CookieCollection.cs @@ -82,7 +82,7 @@ namespace System.Net int pos = SearchCookie (cookie); if (pos == -1) list.Add (cookie); - else + else list [pos] = cookie; } @@ -94,6 +94,9 @@ namespace System.Net for (int i = list.Count - 1; i >= 0; i--) { Cookie c = (Cookie) list [i]; + if (c.Version != cookie.Version) + continue; + if (0 != String.Compare (domain, c.Domain, true, CultureInfo.InvariantCulture)) continue;