Ben Parker wrote:
> We're trying to do something sneaky and have the language code be the 
> first element in the URL, which Apache strips out and sends through to 
> Webware as a CGI environment variable. That was for search engines to 
> see the language code as the first element in the URL, rather than at 
> the end of the URL in an extra path field of query parameter. We want 
> Webware to set the cookie using "/" as the root path.

Ok, now I understand the problem better. Your cookies will probably 
work, but only as long as you stay in the realm of one and the same 
language, right?

If you're doing things like that, one solution is to overwrite 
Application.sessionCookiePath() e.g. by putting the following in the 
__init__.py file of your default context:

import new

def contextInitialize(app, path):
     app.sessionCookiePath = new.instancemethod(
         lambda self, trans: '/', app, app.__class__)

I think the best solution will be to add a "SessionCookiePath" setting 
to Application.config. The default sessionCookiePath() method will then 
evaluate that "SessionCookiePath" setting and use it, or if it is set to 
None, then use the servletPath.

-- Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to