[Mono-bugs] [Bug 349564] HttpCookieCollection.Get does not create cookie if missing

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 18 12:23:04 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=349564

User miguel at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=349564#c2


Miguel de Icaza <miguel at novell.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |miguel at novell.com




--- Comment #2 from Miguel de Icaza <miguel at novell.com>  2007-12-18 10:23:04 MST ---
I wrote a small test case in .NET, not inside a web page, but in a Console
application and am getting a null for non-existent cookies.

This sounds like the documentation is wrong, or  (tested with .NET 2.0).

using System;

using System.Collections.Generic;

using System.Text;

using System.Web;



namespace httpCookie

{

    class Program

    {

        static void Main(string[] args)

        {

            HttpCookieCollection c = new HttpCookieCollection();

            HttpCookie co = c.Get("Dingus");



            Console.WriteLine(co == null);

        }

    }

}

Maybe it happens only when used inside an .aspx page?   Could you confirm by
attaching a test case?


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list