diff options
-rwxr-xr-x | bottle.py | 2 | ||||
-rwxr-xr-x | test/test_wsgi.py | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -233,7 +233,7 @@ class HTTPError(HTTPResponse): self.traceback = traceback def __repr__(self): - return template(ERROR_PAGE_TEMPLATE, e=self) + return tonat(template(ERROR_PAGE_TEMPLATE, e=self)) diff --git a/test/test_wsgi.py b/test/test_wsgi.py index 19543c9..953ee30 100755 --- a/test/test_wsgi.py +++ b/test/test_wsgi.py @@ -76,6 +76,11 @@ class TestWsgi(ServerTestBase): def test(): return 1/0 self.assertStatus(500, '/') + def test_500_unicode(self): + @bottle.route('/') + def test(): raise Exception(touni('Unicode äöüß message.')) + self.assertStatus(500, '/') + def test_utf8_url(self): """ WSGI: Exceptions within handler code (HTTP 500) """ @bottle.route('/my/:string') |