# HG changeset patch # User Sylvain Thénault # Date 1270818504 -7200 # Node ID 2b454c6ab7ef1857c5b2564da8a998a92150a85e # Parent ebb50479d2abd1fd06bd452cb5c6c273ba55a8ae [web] on logout, use the base_url argument of build_url instead of hacking the request to get proper url. This fix a bug on site with http/https versions: the session cookie is badly removed on logout diff -r ebb50479d2ab -r 2b454c6ab7ef web/views/basecontrollers.py --- a/web/views/basecontrollers.py Fri Apr 09 15:07:01 2010 +0200 +++ b/web/views/basecontrollers.py Fri Apr 09 15:08:24 2010 +0200 @@ -91,11 +91,11 @@ # anonymous connection is allowed and the page will be displayed or # we'll be redirected to the login form msg = self._cw._('you have been logged out') - if self._cw.https: - # XXX hack to generate an url on the http version of the site - self._cw._base_url = self._cw.vreg.config['base-url'] - self._cw.https = False - return self._cw.build_url('view', vid='index', __message=msg) + # force base_url so on dual http/https configuration, we generate an url + # on the http version of the site + return self._cw.build_url('view', vid='index', __message=msg, + base_url=self._cw.vreg.config['base-url']) + class ViewController(Controller): """standard entry point :