diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py +++ b/mercurial/hgweb/common.py @@ -131,7 +131,8 @@ def _statusmessage(code): responses = httpserver.basehttprequesthandler.responses - return responses.get(code, ('Error', 'Unknown error'))[0] + return pycompat.bytesurl( + responses.get(code, (r'Error', r'Unknown error'))[0]) def statusmessage(code, message=None): return '%d %s' % (code, message or _statusmessage(code))