Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Fix SCRIPT_NAME being included in path #264

Merged
merged 4 commits into from
Aug 29, 2017
Merged

Fix SCRIPT_NAME being included in path #264

merged 4 commits into from
Aug 29, 2017

Conversation

pringlewood
Copy link
Contributor

Removed environ['SCRIPT_NAME'] where it was being concatenated with environ['PATH_INFO'] to get path

Fixes #257

@tomchristie I have attempted to write a test for this, but if I change the environ dict in test.py it cascades and caused all the other URL tests to fail. Not sure what the best way to handle this is as SCRIPT_NAME is only set when deployed to Lambda

@@ -34,7 +34,7 @@ def get_port(environ: WSGIEnviron):


def get_path(environ: WSGIEnviron):
return environ['SCRIPT_NAME'] + environ['PATH_INFO']
return environ['PATH_INFO']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont want to change this one. (!)
Will explain when at a keyboard.

@tomchristie tomchristie merged commit c2181bf into encode:master Aug 29, 2017
@tomchristie
Copy link
Member

Good stuff, thanks!

We'll want to add MountPath and ApplicationPath components at some point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants