Added removal of tailing '/' if exists #4

Merged
merged 1 commit into from Aug 6, 2012
View
4 CTK/Server.py
@@ -122,7 +122,9 @@ def _do_handle (self):
my_thread.scgi_conn = self
my_thread.request_url = url
- base_path = urlparse.urlsplit(url).path
+ base_path = urlparse.urlsplit(url).path
+ if len(base_path) > 1 and base_path[-1] == '/':
+ base_path = base_path[:-1] # remove trailing '/' if it exists
for published in server._web_paths:
if re.match (published._regex, base_path):