sophana wrote: > Christoph Zwerschke a écrit : >> I tried with >> self.response().setCookie('mycookie', 'myvalue') >> in one servlet - the cookie was there, and then >> self.response().delCookie('mycookie') >> in another servlet - the cookie was gone. > > Did you try with an url rewrite rule? > Maybe the one I have?
No, but if you set cookies manually, the path is always set to '/' unless you specify otherwise. The automatic path determination applies only to the session cookie. So rewrite plays no role here. However, I can imagine one problem. In 0.9.4, cookie.delete() does not set the path to '/' any more, but leaves it alone. This was changed because the session cookie can have a different path from '/'. However, for a manually set cookie, delCookie now deletes a cookie with path='', while setCookie had set a cookie with path='/'. Maybe some browsers think the cookies are different because of that. (Which browser were you using? I tested with Firefox.) My solution was to add a parameter "path" with the same default '/' as setCookie to delCookie to make sure the cookies always have the same path. You must check out the new version of HTTPResponse.py for testing: http://svn.w4py.org/Webware/trunk/WebKit/HTTPResponse.py By the way, you can also use Session() instead of manually fiddling around with cookies. That's much easier. -- Christoph ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss