2010-05-05 Marek Habersack <mhabersack@novell.com>
[mono.git] / mcs / class / System.Web / System.Web / WebROCollection.cs
index fded021a9853d94751191e156b5bc2436e8a496a..ddb2e300d84bb5dc8dcc2e5f03d40be86af34d83 100644 (file)
@@ -4,7 +4,7 @@
 // Authors:
 //     Gonzalo Paniagua Javier (gonzalo@novell.com)
 //
-// (c) 2005 Novell, Inc. (http://www.novell.com)
+// (c) 2005-2009 Novell, Inc. (http://www.novell.com)
 //
 //
 // Permission is hereby granted, free of charge, to any person obtaining
@@ -36,6 +36,7 @@ namespace System.Web
                bool got_id;
                int id;
 
+               public WebROCollection () : base (StringComparer.OrdinalIgnoreCase) { }
                public bool GotID {
                        get { return got_id; }
                }
@@ -64,8 +65,10 @@ namespace System.Web
                                if (result.Length > 0)
                                        result.Append ('&');
 
-                               result.Append (key);
-                               result.Append ('=');
+                               if (key != null && key.Length > 0){
+                                       result.Append (key);
+                                       result.Append ('=');
+                               }
                                result.Append (Get (key));
                        }