From 019295e1d15ba6d0110b3fb1519c6f763fa956a0 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 11 Aug 2019 10:58:22 -0700 Subject: [PATCH] reverting 2c364c2079c4c12cbb861ba6b9153a44b748eb14 which incorrecly assumes the scheme can only be http or https --- gluon/packages/dal | 2 +- gluon/rewrite.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gluon/packages/dal b/gluon/packages/dal index 54191338..8e544905 160000 --- a/gluon/packages/dal +++ b/gluon/packages/dal @@ -1 +1 @@ -Subproject commit 541913385cb731f2802b3f1b6f744093bb3abdf3 +Subproject commit 8e544905d3304c587f52cdedd3948cf586c4f7ae diff --git a/gluon/rewrite.py b/gluon/rewrite.py index 48c1535b..526e2a10 100644 --- a/gluon/rewrite.py +++ b/gluon/rewrite.py @@ -204,7 +204,7 @@ def url_out(request, environ, application, controller, function, if host is True or (host is None and (scheme or port is not None)): host = request.env.http_host if not scheme or scheme is True: - scheme = 'https' if request and request.is_https else 'http' + scheme = request.env.get('wsgi_url_scheme', 'http').lower() if request else 'http' if host: host_port = host if not port else host.split(':', 1)[0] + ':%s' % port url = '%s://%s%s' % (scheme, host_port, url)