Skip to content

Instantly share code, notes, and snippets.

@moshez
Created April 28, 2015 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moshez/c03f687b5826977c8129 to your computer and use it in GitHub Desktop.
Save moshez/c03f687b5826977c8129 to your computer and use it in GitHub Desktop.
In [18]: from werkzeug.routing import Map, Rule
In [19]: a=Map()
In [20]: b=Rule('/<__rest__>')
In [21]: a.add(b)
In [22]: c=a.bind('foo', path_info='/foo/%0A%0D')
In [23]: c.match()
---------------------------------------------------------------------------
NotFound Traceback (most recent call last)
<ipython-input-23-006d8c2ffcec> in <module>()
----> 1 c.match()
/home/moshez/src/games/venv/local/lib/python2.7/site-packages/werkzeug/routing.pyc in match(self, path_info, method, return_rule, query_args)
1481 if have_match_for:
1482 raise MethodNotAllowed(valid_methods=list(have_match_for))
-> 1483 raise NotFound()
1484
1485 def test(self, path_info=None, method=None):
NotFound: 404: Not Found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment