mitsuhiko/werkzeug — pull request #405 by karipe (2013-07-05 05:52:46+00:00)
Title: Fix decode error when using wsgi container and enter erroneous url.

You can know below url is erroneous utf-8 url.
http://foo.bar/%EB%82%98%EC%99

If upper one inputted default server, it hasn't problem. But upper one inputted wsgi container, occur below error.

File "/home/username/pyenv/local/lib/python2.7/site-packages/werkzeug/routing.py", line 1202, in bind_to_environ
path_info = _get_wsgi_string('PATH_INFO')
File "/home/username/pyenv/local/lib/python2.7/site-packages/werkzeug/routing.py", line 1199, in _get_wsgi_string
return wsgi_decoding_dance(val, self.charset)
File "/home/username/pyenv/local/lib/python2.7/site-packages/werkzeug/_compat.py", line 92, in wsgi_decoding_dance
return s.decode(charset)
File "/home/username/pyenv/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 3-4: unexpected end of data

This pull request fixed that error.