[drakma-devel] Re: Parsing quoted cookie values (bug?)
Victor Kryukov
victor.kryukov at gmail.com
Tue Mar 18 00:35:55 UTC 2008
Edi Weitz <edi at agharta.de> writes:
> On Mon, 17 Mar 2008 18:04:18 -0500, Victor Kryukov <victor.kryukov at gmail.com> wrote:
>
>> I understand why you may want to be less strict about following the
>> standard and allow some deviations from it, but current DRAKMA
>> behaviour is broken for the sites that _do follow the standard_,
>> which I think is not acceptable, as least not as a default
>> behaviour.
>
> Agreed.
>
>> Do you mean old-style Netscape cookies[1]?
>
> Allowing old-style Netscape cookies - at least optionally - would be a
> good idea, yes.
It seems to me that this is exactly what read-cookie-value is
doing. So we just need to wrap it up nicely.
>> Also, there are mutliple strategies to fix that. One is to follow
>> RFC2109 by default, but allow for Netscape-style cookies after
>> setting a certain parameter (I'd prefer this one). Another is to try
>> to follow RFC 2109, but then rollback to Netscape-style cookies if
>> parsing error occurs. There are probably other possible approaches.
>> Which one would you prefer?
>
> The ideal solution, I think, would be a combination of the first two
> strategies you mentioned. Follow RFC2109 by default, but provide one
> or more sensible restarts in case a parsing error occurs.
> Additionally, have some parameter (probably a global special variable)
> which if set automatically invokes the "use old Netscape-style"
> restart.
>
> Does that sound reasonable?
Yes, that must be the optimal solution. I'll try to implement it as a
patch soon, most likely early next week.
Best Regards,
Victor
--
http://macrodefinition.blogspot.com
More information about the Drakma-devel
mailing list