summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphcacheserver/repocache.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/morphcacheserver/repocache.py b/morphcacheserver/repocache.py
index b55692f2..b7d46c35 100644
--- a/morphcacheserver/repocache.py
+++ b/morphcacheserver/repocache.py
@@ -137,7 +137,10 @@ class RepoCache(object):
def _quote_url(self, url, always_indirect=False):
if self.direct_mode and not always_indirect:
- return urlparse.urlparse(url)[2]
+ quoted_url = urlparse.urlparse(url)[2]
+ while quoted_url.startswith("/"):
+ quoted_url = quoted_url[1:]
+ return quoted_url
else:
valid_chars = string.digits + string.letters + '%_'
transl = lambda x: x if x in valid_chars else '_'