summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbottle.py2
-rwxr-xr-xtest/test_wsgi.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/bottle.py b/bottle.py
index 6b55c22..998d8e4 100755
--- a/bottle.py
+++ b/bottle.py
@@ -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')