[Mono-bugs] [Bug 79821][Nor] New - HttpResponse behavior with cookies inconsistent with .Net
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Nov 3 15:43:56 EST 2006
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 abovill at fnfr.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79821
--- shadow/79821 2006-11-03 15:43:55.000000000 -0500
+++ shadow/79821.tmp.14060 2006-11-03 15:43:55.000000000 -0500
@@ -0,0 +1,95 @@
+Bug#: 79821
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details: Windows XP SP2 & Fedora FC3 2.6.12-1.1381_FC3
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: gonzalo at ximian.com
+ReportedBy: abovill at fnfr.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: HttpResponse behavior with cookies inconsistent with .Net
+
+HttpResponse behavior with cookies inconsistent with .Net
+
+
+Description of Problem:
+The HttpResponse no longer updates the CookieCollection that it was assigned.
+
+In .Net, the original cookie collection is updated.
+
+The example below downloads a page from Google that has a cookie in it.
+
+Steps to reproduce the problem:
+1. Here is the code:
+--------
+using System;
+using System.Net;
+
+namespace CookieProblem
+{
+ class Program
+ {
+ private static CookieContainer _CookieContainer = new
+CookieContainer();
+
+ static void Main(string[] args)
+ {
+ HttpWebRequest hwReq =
+(HttpWebRequest)WebRequest.Create("http://www.google.com");
+ hwReq.CookieContainer = _CookieContainer;
+ Console.WriteLine("Cookie Container count: " +
+_CookieContainer.Count);
+ HttpWebResponse response = (HttpWebResponse)hwReq.GetResponse();
+ Console.WriteLine("Got page: " + response.ResponseUri);
+ Console.WriteLine("Got cookies: " + response.Cookies.Count);
+ Console.WriteLine("Cookie Container count: " +
+_CookieContainer.Count);
+ }
+ }
+}
+--------
+
+2.Compile
+3. Run
+
+Actual Results:
+Windows (Mono 1.1.18)
+C:\svt\MonoBugs\CookieProblem>mono Program.exe
+Cookie Container count: 0
+Got page: http://www.google.com/
+Got cookies: 1
+Cookie Container count: 0
+C:\svt\MonoBugs\CookieProblem>
+
+Linux (mono 1.1.18)
+[abovill at engreglinux CookieProblem]$ mono Program.exe
+Cookie Container count: 0
+Got page: http://www.google.com/
+Got cookies: 1
+Cookie Container count: 0
+[abovill at engreglinux CookieProblem]$
+
+Expected Results:
+.Net (MS WindowsXP .Net 2.0)
+
+C:\svt\MonoBugs\CookieProblem\bin\Debug>CookieProblem.exe
+Cookie Container count: 0
+Got page: http://www.google.com/
+Got cookies: 1
+Cookie Container count: 1
+
+C:\svt\MonoBugs\CookieProblem\bin\Debug>cd ..
+
+
+
+How often does this happen?
+Always
+
+Additional Information:
More information about the mono-bugs
mailing list