mitsuhiko  committed 8ce6f2d Merge

url routing system properly supports unicode URL rules now.

  • Participants
  • Parent commits 1a9c325, f83c2ca
  • Branches default

Comments (0)

Files changed (8)

 (codename to be selected, release date yet unknown)
 - fixed boolean check of :class:`FieldStorage`
+- url routing system properly supports unicode URL rules now.
 Version 0.5
 recursive-include docs *
 recursive-include examples *
 recursive-include artwork *
+prune docs/_build/doctrees

File docs/cheatsheet.pdf

Binary file removed.

File docs/cheatsheet.svg

Old image

File docs/quickstart.rst

 ['name=value; Path=/', 'name2=value2; Path=/']
 Finally if you have set all the conditional values you can make the
-response conditional against a requset.  Which means that if the request
+response conditional against a request.  Which means that if the request
 can assure that it has the information already, no data besides the headers
 is sent over the network which saves traffic.  For that you should set at
 least an etag (which is used for comparision) and the date header and then

File tests/

     adapter = map.bind('localhost', '/')
     assert'index', {'x': 20, 'y': 10, 'z': 30},
         force_external=True) == 'http://localhost/?y=10&x=20&z=30'
+def test_request_direct_charset_bug():
+    map = Map([Rule(u'/öäü/')])
+    adapter = map.bind('localhost', '/')
+    try:
+        adapter.match(u'/öäü')
+    except RequestRedirect, e:
+        print repr(e.new_url)
+        assert e.new_url == 'http://localhost/%C3%B6%C3%A4%C3%BC/'
+    else:
+        raise AssertionError('expected request redirect exception')

File werkzeug/

                     self.subdomain and self.subdomain + '.' or '',
-                    path_info.lstrip('/').encode(
+                    url_quote(path_info.lstrip('/'),
             if rv is None:
                             subdomain and subdomain + '.' or '',
-                            path.lstrip('/').encode(
+                            url_quote(path.lstrip('/'),
             if rule.redirect_to is not None:
                 if isinstance(rule.redirect_to, basestring):

File werkzeug/

         _log('info', ' * Running on http://%s:%d/', display_hostname, port)
     if use_reloader:
         # Create and destroy a socket so that any exceptions are raised before
-        # we spawn a separate Python interpreter and loose this ability.
+        # we spawn a separate Python interpreter and lose this ability.
         test_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         test_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
         test_socket.bind((hostname, port))