[drakma-devel] duplicate cookies problem with proposed patch

Ryan Davis ryan at acceleration.net
Tue Apr 6 14:58:55 UTC 2010


On 4/6/2010 9:43 AM, Edi Weitz wrote:
> But that's about different /attributes/ in the same cookie, that's not
> exactly the same, is it?
>
>   
Yes, that's correct.  Reading further I see:

4.3.3  Cookie Management

   If a user agent receives a Set-Cookie response header whose NAME is
   the same as a pre-existing cookie, and whose Domain and Path
   attribute values exactly (string) match those of a pre-existing
   cookie, the new cookie supersedes the old.

I think this justifies :KEEP-LAST as the default behavior, if you
interpret the first Set-Cookie header creating the cookie, and the
second Set-Cookie header superseding the pre-existing cookie.

I've attached a patch that introduces *remove-duplicate-cookies-p* as
you mentioned in earlier email, with NIL as the default, so existing
behavior is maintained.  I haven't exported the symbol or added
documentation yet, but wanted to run this by you first. 

I wrote a few unit tests (using the LIFT framework,
http://common-lisp.net/project/lift/), are you interested in those?  I'm
honestly not sure what value they will have to anyone else, and I'm
hesitant to add testing code to drakma proper if I'm the only one likely
to run it (and I'm fairly unlikely to run it after my itch is
scratched).  If you'd like that, then I'll put together a separate patch
with a drakma-tests.asd to sort out the dependencies.
> _______________________________________________
> drakma-devel mailing list
> drakma-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: remove-duplicate-cookies.patch
URL: <https://mailman.common-lisp.net/pipermail/drakma-devel/attachments/20100406/8d826c38/attachment.ksh>


More information about the Drakma-devel mailing list