curl-library
Re: http-state and cookie order
Date: Tue, 13 Apr 2010 09:14:55 +0200
On 13 apr 2010, at 08.49, Daniel Stenberg wrote:
> Right, that would work but would be a bit more painful to parse since it'd require the parser to do two different line formats and remember for what cookie the time entry is for etc.
>
> I also got a really good idea from Micah Cowan (ex wget maintainer) when I talked to #wget about this (as they suffer from the exact same problem): we can just make sure to save cookies in the file in time order, with the oldest first. When we load cookies (or even receiver over the wire) we just bump a counter and store that for each cookie and thus we will always know which is the oldest and which is newer, without actually storing the info in the file - as we don't need the exact number!
>
> I'm very attracted to that idea as it maintains the file format unmodified and yet should be able to sort the cookies as the RFC will mandate...
Yes, this would also work and would probably be the simplest and least intrusive solution.
/Claes
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-13