Re: MP2 easy cookie interface available

2005-08-23 Thread John ORourke
Sounds great, it'd be a nice addition to Apache2::Cookie. Getting the secret through to freeze and thaw is the tricky bit - I guess it could just be supplied to fetch() and new(). There are a couple of extras that I'm adding: - a delete method which deletes the cookie by name (ie. you don't ha

Re: MP2 easy cookie interface available

2005-08-23 Thread Jonathan Vanasco
Having it validate the cookie based on a hash on data+ server secret is a great addition. I've been doing that already on a custom abstraction class for Apache::Cookie as well -- i needed to build something that would switch the cookie baking code to either use headers_out or bake on the fly

Re: MP2 easy cookie interface available

2005-08-23 Thread John ORourke
Thanks for the feedback Philip. I believe it does subclass APR::Request::Cookie but I just left in all the 'use' statements from Apache2::Cookie. I figured the APR:: namespace would be the wrong place for it too. It need to override so many methods because they need to get the RequestRec ob

Re: MP2 easy cookie interface available

2005-08-23 Thread Philip M. Gollucci
Fowarding to apreq-dev (at) apache.org Did you really need to override all those methods? Granted I haven't looked at it that closely. The bigest thing I would say is you should subclass perhaps APR::Request::Cookie instead as that is the API we recommend these days. John ORourke wrote: Hi

MP2 easy cookie interface available

2005-08-23 Thread John ORourke
Hi folks, I found the available cookie methods a bit tricky to use (I think the blessed scalars or overloading were confusing me!), so I wrote a simple cookie interface to use in place of Apache2::Cookie. Most of the code is copied from that. I haven't got time to CPAN-ify it at the mo, but