diff --git a/VERSION b/VERSION index de26edf7..46973c25 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.7.4-stable+timestamp.2013.11.01.18.06.35 +Version 2.7.4-stable+timestamp.2013.11.01.18.48.46 diff --git a/gluon/rewrite.py b/gluon/rewrite.py index 6de99861..d42532c3 100644 --- a/gluon/rewrite.py +++ b/gluon/rewrite.py @@ -41,9 +41,6 @@ regex_redirect = re.compile(r'(\d+)->(.*)') regex_full_url = re.compile( r'^(?Phttp|https|HTTP|HTTPS)\://(?P[^/]*)(?P.*)') regex_version = re.compile(r'^(_[\d]+\.[\d]+\.[\d]+)$') -# pattern to replace spaces with underscore in URL -# also the html escaped variants '+' and '%20' are covered -regex_space = re.compile('(\+|\s|%20)+') # pattern to find valid paths in url /application/controller/... # this could be: @@ -625,8 +622,8 @@ def regex_url_in(request, environ): # serve if a static file # ################################################## - path = request.env.path_info.replace('\\', '/') or '/' - path = regex_space.sub('_', path) + path = urllib.unquote(request.env.path_info) or '/' + path = path.replace('\\', '/').replace(' ','_') if path.endswith('/') and len(path) > 1: path = path[:-1] match = regex_url.match(path)