[Mono-dev] Patch for CookieContainer.SetCookies
Sebastien Pouliot
sebastien.pouliot at gmail.com
Thu Jan 21 10:03:58 EST 2010
Committed to trunk with r149976
I'll backport it later to 2-6 and 2-4
Thanks again
Sebastien
On Wed, 2010-01-20 at 21:21 -0500, Sebastien Pouliot wrote:
> 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
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list