[Mono-dev] Patch for CookieContainer.SetCookies
Sebastien Pouliot
sebastien.pouliot at gmail.com
Wed Jan 20 21:21:00 EST 2010
On Wed, 2010-01-20 at 17:48 -0800, Tom Philpot wrote:
>
> On Jan 20, 2010, at 1:58 PM, Sebastien Pouliot wrote:
> > >
> >
> > why not simply
> > c.HttpOnly = cookie.HttpOnly;
> > c.Secure = cookie.Secure;
> > ?
> >
> > if there's a problem with this simpler code then it does not get
> > caught
> > by your new unit tests.
> >
> >
>
>
> I had thought I saw code like the following in Cookie.cs (for Secure
> and HttpOnly) at one point.
> public bool Secure
> {
> get { return secure; }
> set { secure = true; }
> }
Aha! There's an app for this!
Well actually it's a Gendarme rule ;-). I don't recall every cases but a
few where found (and fixed) in the class libraries (about 2 years ago).
> Je fumais la moquette.
pas de doute que quelqu'un en fumait du bon ;-)
>
> >
> > I suspect the "expires" case is the buggy one wrt your unit test
> > (previous email).
> >
> > Sebastien
> >
> >
>
> The expires test case worked perfectly if you're on the Pacific Time
> Zone ;).
Heh, I guessed it worked somewhere in the world ;-)
> It should be fixed in this patch.
>
>
> I believe I've followed the coding conventions, but I'm not quite sure
> about the long Regex's in CookieContainer.cs.
Looks great convention wise. I'll test it tomorrow and, if everything
works, commit it.
Thanks
Sebastien
More information about the Mono-devel-list
mailing list