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