* NetworkAccess.cs: Only mark as flags enum on 2.0.
[mono.git] / mcs / class / System / System.Net / CookieContainer.cs
index f1ca4c8a451ddcf82753c67cb45e710e9c36624f..de818005de60c91938304b49a1a6c7137709f4fc 100644 (file)
@@ -189,7 +189,7 @@ namespace System.Net
                        if (uri != null && cookie.Domain == "")
                                cookie.Domain = uri.Host;
 
-                       if (cookie.Path == null || cookie.Path == "") {
+                       if (cookie.Version == 0 && (cookie.Path == null || cookie.Path == "")) {
                                if (uri != null) {
                                        cookie.Path = uri.AbsolutePath;
                                } else {
@@ -304,7 +304,8 @@ namespace System.Net
 
                                coll.Add (cookie);
                        }
-                       
+
+                       coll.SortByPath ();
                        return coll;
                }