Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

remove trailing "/" if it exists

  • Loading branch information...
commit f2e15a190bb5b0c3a6bba3baeeee896da43b97a6 1 parent 09208d3
Jędrzej Nowak authored August 06, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  CTK/Server.py
4  CTK/Server.py
@@ -122,7 +122,9 @@ def _do_handle (self):
122 122
         my_thread.scgi_conn   = self
123 123
         my_thread.request_url = url
124 124
 
125  
-        base_path = urlparse.urlsplit(url).path
  125
+        base_path = urlparse.urlsplit(url).path        
  126
+        if len(base_path) > 1 and base_path[-1] == '/':
  127
+            base_path = base_path[:-1]  # remove trailing '/' if it exists
126 128
 
127 129
         for published in server._web_paths:
128 130
             if re.match (published._regex, base_path):

0 notes on commit f2e15a1

Please sign in to comment.
Something went wrong with that request. Please try again.