[FIX] web: session requires a name to properly work
For historic reasons, the session had a name (hardcoded to "instance0"), used in at least one place: the get and set cookie methods. The idea was most likely to allow multiple instances of the web client to coexist peacefully. This does not work at all at least for the last versions, and the new module system is a better way to do it anyway. However, before removing completely the prefix in cookies, we should actually check if no external code depends on it.
This commit is contained in:
@@ -33,6 +33,11 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, {
|
||||
this.use_cors = options.use_cors || false;
|
||||
this.setup(origin);
|
||||
this.debug = ($.deparam($.param.querystring()).debug !== undefined);
|
||||
|
||||
// for historic reasons, the session requires a name to properly work
|
||||
// (see the methods get_cookie and set_cookie). We should perhaps
|
||||
// remove it totally (but need to make sure the cookies are properly set)
|
||||
this.name = "instance0";
|
||||
// TODO: session store in cookie should be optional
|
||||
this.qweb_mutex = new utils.Mutex();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user