From 5788066a6d95dbdf2963a38a6374260cf3ab36f5 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Fri, 24 Jul 2015 10:04:47 -0400 Subject: [PATCH] SCRIPT_NAME can be empty or not in the environment at all. This resolves http://dev.list.galaxyproject.org/NGINX-uWSGI-with-require-login-needs-uwsgi-param-SCRIPT-NAME-td4666901.html. Thanks to @dctrud and @ericenns for the help tracking it down. --- lib/galaxy/web/framework/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/web/framework/base.py b/lib/galaxy/web/framework/base.py index 590cf9a37eb..3f1e370bcfb 100644 --- a/lib/galaxy/web/framework/base.py +++ b/lib/galaxy/web/framework/base.py @@ -353,7 +353,7 @@ class Request( webob.Request ): @lazy_property def path( self ): - return self.environ['SCRIPT_NAME'] + self.environ['PATH_INFO'] + return self.environ.get('SCRIPT_NAME', '') + self.environ['PATH_INFO'] @lazy_property def browser_url( self ):