# HG changeset patch # User Julien Cristau # Date 1446549914 -3600 # Node ID fef0ab4c4f94c77d6e57575d4027ce039b2edcfd # Parent 5b5864483c4d2a61c95467094536dcd2ed833dd0 [web/application] return bytes from redirect_handler and validation_error_handler diff -r 5b5864483c4d -r fef0ab4c4f94 web/application.py --- a/web/application.py Mon Oct 19 17:54:26 2015 +0200 +++ b/web/application.py Tue Nov 03 12:25:14 2015 +0100 @@ -439,7 +439,7 @@ req.headers_out.setHeader('location', str(ex.location)) assert 300 <= ex.status < 400 req.status_out = ex.status - return '' + return b'' def validation_error_handler(self, req, ex): ex.translate(req._) # translate messages using ui language @@ -456,7 +456,7 @@ location = req.form['__errorurl'].rsplit('#', 1)[0] req.headers_out.setHeader('location', str(location)) req.status_out = http_client.SEE_OTHER - return '' + return b'' req.status_out = http_client.CONFLICT return self.error_handler(req, ex, tb=False)