Author: kostat
Date: 2007-04-30 03:53:58 -0400 (Mon, 30 Apr 2007)
New Revision: 76477

Modified:
   trunk/mcs/class/System.Web/System.Web/HttpParamsCollection.cs
Log:
Fix typo in MergeCollections (); refactoring

Modified: trunk/mcs/class/System.Web/System.Web/HttpParamsCollection.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpParamsCollection.cs       
2007-04-30 07:53:14 UTC (rev 76476)
+++ trunk/mcs/class/System.Web/System.Web/HttpParamsCollection.cs       
2007-04-30 07:53:58 UTC (rev 76477)
@@ -50,7 +50,7 @@
                        _serverVariables = serverVariables;
                        _cookies = cookies;
                        _merged = false;
-                       IsReadOnly = true;
+                       Protect ();
                }
 
                public override string Get (string name)
@@ -99,10 +99,13 @@
 
                        /* special handling for Cookies since
                         * it isn't a NameValueCollection. */
-                       string [] cookies = _cookies.AllKeys;
-                       foreach (string k in cookies)
-                               Add (k, _cookies [k].Value);
+                       for (int i = 0; i < _cookies.Count; i++) {
+                               HttpCookie cookie = _cookies [i];
+                               Add (cookie.Name, cookie.Value);
+                       }
 
+                       _merged = true;
+
                        Protect ();
                }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to