Skip to content

Commit

Permalink
Strip script name from path
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed May 22, 2017
1 parent 16e9617 commit fc05e55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions radicale/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ def response(status, headers=(), answer=None):
environ["PATH_INFO"] = storage.sanitize_path(environ["PATH_INFO"])
self.logger.debug("Sanitized path: %s", environ["PATH_INFO"])
path = environ["PATH_INFO"]
if base_prefix and path.startswith(base_prefix):
path = path[len(base_prefix):]
self.logger.debug("Stripped script name from path: %s", path)

# Get function corresponding to method
function = getattr(self, "do_%s" % environ["REQUEST_METHOD"].upper())
Expand Down

0 comments on commit fc05e55

Please sign in to comment.