diff options
author | ianb <devnull@localhost> | 2008-04-18 21:27:28 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2008-04-18 21:27:28 +0000 |
commit | 35876f52585996786000c8317ae93b581af3c7a9 (patch) | |
tree | f836c12253a431a0de958c1243a56efbeaa8fa89 /paste/urlparser.py | |
parent | 31317715886591a64681f4cc0cee1aaaf88d0896 (diff) | |
download | paste-35876f52585996786000c8317ae93b581af3c7a9.tar.gz |
Fix case normalization on Windows
Diffstat (limited to 'paste/urlparser.py')
-rw-r--r-- | paste/urlparser.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/paste/urlparser.py b/paste/urlparser.py index 2f79796..d508b77 100644 --- a/paste/urlparser.py +++ b/paste/urlparser.py @@ -454,7 +454,8 @@ class StaticURLParser(object): filename = 'index.html' else: filename = request.path_info_pop(environ) - full = os.path.normpath(os.path.join(self.directory, filename)) + full = os.path.normcase(os.path.normpath( + os.path.join(self.directory, filename)))) if os.path.sep != '/': full = full.replace('/', os.path.sep) if self.root_directory is not None and not full.startswith(self.root_directory): @@ -564,7 +565,8 @@ class PkgResourcesParser(StaticURLParser): filename = 'index.html' else: filename = request.path_info_pop(environ) - resource = os.path.normpath(self.resource_name + '/' + filename) + resource = os.path.normcase(os.path.normpath( + self.resource_name + '/' + filename)) if self.root_resource is not None and not resource.startswith(self.root_resource): # Out of bounds return self.not_found(environ, start_response) |