dispatch: don't match path case

This commit is contained in:
Jérôme Schneider 2015-01-30 15:52:23 +01:00
parent 1eec694e1c
commit 30a9290986
1 changed files with 4 additions and 2 deletions

View File

@ -107,11 +107,13 @@ class Dispatcher(object):
for entry in mapping:
if entry.has_key('path'):
if isinstance(entry['path'], str):
if re.match(entry['path'], self.env['PATH_INFO']):
if re.match(entry['path'], self.env['PATH_INFO'],
re.IGNORECASE):
req_mapping = self.__get_mappings_hooks(entry, req_mapping)
else:
for path in entry['path']:
if re.match(path, self.env['PATH_INFO']):
if re.match(path, self.env['PATH_INFO'],
re.IGNORECASE):
req_mapping = self.__get_mappings_hooks(entry, req_mapping)
else:
logger.warning('Config error: you need to specify paths in your mapping')