diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -101,8 +101,8 @@ try: self.do_write() except Exception: - self._start_response("500 Internal Server Error", []) - self._write("Internal Server Error") + self._start_response(r"500 Internal Server Error", []) + self._write(b"Internal Server Error") self._done() tb = r"".join(traceback.format_exception(*sys.exc_info())) # We need a native-string newline to poke in the log