fixed issue 1173, request.requires_https, thanks Maciej

This commit is contained in:
mdipierro
2012-11-17 12:14:28 -06:00
parent 3ece96ae08
commit faf76ac715
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.2.1 (2012-11-17 12:06:36) stable
Version 2.2.1 (2012-11-17 12:14:24) stable
+5 -2
View File
@@ -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):