2006-01-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System / System.Net / Cookie.cs
index 4c82641abb3cdf1af97b6c8349604b535b31381e..dcc56400a75b9ae4057a554af34c40006557b964 100644 (file)
@@ -31,6 +31,7 @@
 
 using System;
 using System.Text;
+using System.Globalization;
 
 namespace System.Net {
 
@@ -57,7 +58,6 @@ namespace System.Net {
                int version;
                
                static char [] reservedCharsName = new char [] {' ', '=', ';', ',', '\n', '\r', '\t'};
-               static char [] reservedCharsValue = new char [] {';', ','};
                static char [] portSeparators = new char [] {'"', ','};
                 static string tspecials = "()<>@,;:\\\"/[]?={} \t";   // from RFC 2965, 2068
 
@@ -227,10 +227,10 @@ namespace System.Net {
                        System.Net.Cookie c = obj as System.Net.Cookie;                 
                        
                        return c != null &&
-                              String.Compare (this.name, c.name, true) == 0 &&
-                              String.Compare (this.val, c.val, false) == 0 &&
-                              String.Compare (this.path, c.path, false) == 0 &&
-                              String.Compare (this.domain, c.domain, true) == 0 &&
+                              String.Compare (this.name, c.name, true, CultureInfo.InvariantCulture) == 0 &&
+                              String.Compare (this.val, c.val, false, CultureInfo.InvariantCulture) == 0 &&
+                              String.Compare (this.path, c.path, false, CultureInfo.InvariantCulture) == 0 &&
+                              String.Compare (this.domain, c.domain, true, CultureInfo.InvariantCulture) == 0 &&
                               this.version == c.version;
                }