mitsuhiko/werkzeug — pull request #466 by defuz (2013-11-28 22:50:08+00:00)
Title: Fix broken Request.__repr__ for non ascii-urls

When some url contains non-ascii characters, `repr(request)` failed in python 2.*:

```
>>> from werkzeug import Request
>>> Request.from_values("/gh")

>>> Request.from_values("/привет")
Traceback (most recent call last):
File "", line 1, in
UnicodeEncodeError: 'ascii' codec can't encode characters in position 27-32: ordinal not in range(128)
```

I used function `_compat.to_native` to maintain compatibility.
Also I fixed test `test_redirect_path_quoting` which is failed with python 2.7, because `Response.headers` contains unicode since 0.9 version.