This is relevant for fcgi:
Some servers (cherokee for example) put "HTTP":"off" in the
environ. And the following code in urlgen breaks on this:
if environ.get('HTTPS') or environ.get('wsgi.url_scheme') == 'https' \
or environ.get('HTTP_X_FORWARDED_PROTO') == 'https':
hostinfo['protocol'] = 'https'
workaround is to remove HTTPS:off from the environ.
# The other option would be:
# request.full_path = environ["SCRIPT_URL"]
+ # Fix up environ for urlgen
+ if environ.get('HTTPS', '').lower() == 'off':
+ environ.pop('HTTPS')
+
## Attach utilities to the request object
request.matchdict = route_match
request.urlgen = routes.URLGenerator(self.routing, environ)