[Mono-bugs] [Bug 81420][Nor] New - CookieContainer: cookies are being incorrectly added to container
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Apr 22 05:21:59 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by steveb at mindtouch.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81420
--- shadow/81420 2007-04-22 05:21:59.000000000 -0400
+++ shadow/81420.tmp.13257 2007-04-22 05:21:59.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 81420
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com
+ReportedBy: steveb at mindtouch.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CookieContainer: cookies are being incorrectly added to container
+
+Description of Problem:
+When adding a cookie with the 'Add(Uri, Cookie)' method, the cookie is not
+being added correctly. The following code demonstrates the difference
+between mono and .Net.
+
+----
+using System;
+using System.Net;
+
+namespace CookieTest {
+ class Program {
+ static void Main(string[] args) {
+ CookieContainer container = new CookieContainer();
+
+ // add cookie for a given uri
+ container.Add(new Uri("http://localhost/path"), new
+Cookie("name", "value"));
+
+ // retrieve cookies for that uri
+ CookieCollection cookies = container.GetCookies(new
+Uri("http://localhost/path"));
+ foreach(Cookie c in cookies) {
+ Console.WriteLine("{0}=\"{1}\"; path=\"{2}\";
+domain=\"{3}\"", c.Name, c.Value, c.Path, c.Domain);
+ }
+ }
+ }
+}
+----
+
+
+Actual Results (as seen on mono):
+name="value"; path="/"; domain="localhost"
+
+
+Expected Results (as seen on .Net):
+name="value"; path="/path"; domain="localhost"
+
+
+How often does this happen?
+Bug happens all the time.
More information about the mono-bugs
mailing list