diff --git a/VERSION b/VERSION index a932340d..c68a0581 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-11-17 12:06:36) stable +Version 2.2.1 (2012-11-17 12:14:24) stable diff --git a/gluon/globals.py b/gluon/globals.py index e274d74a..0ff69ae3 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -129,11 +129,14 @@ class Request(Storage): cmd_opts = global_settings.cmd_options #checking if this is called within the scheduler or within the shell #in addition to checking if it's not a cronjob - if not cmd_opts.shell and not cmd_opts.scheduler and not global_settings.cronjob and not self.is_https: + if ((cdm_opts and (cmd_opts.shell or cmd_opts.scheduler)) + or global_settings.cronjob or self.is_https): + current.session.secure() + else: current.session.forget() redirect(URL(scheme='https', args=self.args, vars=self.vars)) - current.session.secure() + def restful(self): def wrapper(action, self=self):