[Zope3-dev] quoting cookies

Steve Alexander steve@cat-box.net
Thu, 20 Feb 2003 18:04:07 +0200


>>If you're interoperating like this, then the nature of your cookies 
>>already depends on that other system. So, there's no benefit in 
>>extracting the quoting policy into a general adapter.
> 
> A utility, not an adapter (there is no "source" interface to adapt). 

Right.


> This is precisely the case I had in mind:  some other sever (e.g.,
> 'mod_usertrack') 

Can you explain a bit more about how code would integrate with 
mod_usertrack?

Is it only a case of changing the cookie-quoting system?
Or, are there other requirements for the name and content of cookies?

If so, you'll be changing more code than just the cookie-quoting code.

Does this only apply to certain cookies?


> will be setting / using the cookie, and you want Zope
> to "play nice" with it.  In that case, you would wire in a different
> implementation of the utility.  Most people would never change the
> default version.
> 
> 
>>I don't actually have the requirement to interoperate in this way.
> 
> 
> Requiring people to change Python code to change policies seems like an
> "anti-use-case" for the component architecture.  I am therefore -1 on a
> "raw" parameter to the 'setCookie' API.

I don't see the point in making something configurable via a utility if 
you always need to use special components that will use this utility.

So, if the only code that requires specially quoted cookies is a 'works 
with mod_usertrack auth service', then I think it is reasonable to 'hard 
code' the quoting function into that code.

--
Steve Alexander