Merge pull request #1430 from ShySec/static_path_match
fixed "/app/static" throwing AttributeError instead of HTTP(404)
This commit is contained in:
@@ -638,9 +638,10 @@ def regex_url_in(request, environ):
|
||||
request.raw_args = request.raw_args[1:]
|
||||
if match.group('c') == 'static':
|
||||
application = match.group('a')
|
||||
version, filename = None, match.group('z').replace(' ', '_')
|
||||
version, filename = None, match.group('z')
|
||||
if not filename:
|
||||
raise HTTP(404)
|
||||
filename = filename.replace(' ','_')
|
||||
items = filename.split('/', 1)
|
||||
if regex_version.match(items[0]):
|
||||
version, filename = items
|
||||
|
||||
Reference in New Issue
Block a user