mercurial/hgweb/server.py
changeset 38308 9f499d28efb4
parent 37788 ed5448edcbfa
child 38309 af0e88e64ede
--- a/mercurial/hgweb/server.py	Tue Jun 12 18:49:35 2018 -0400
+++ b/mercurial/hgweb/server.py	Tue Jun 12 20:42:42 2018 -0400
@@ -125,8 +125,9 @@
         # Ensure the slicing of path below is valid
         if (path != self.server.prefix
             and not path.startswith(self.server.prefix + b'/')):
-            self._start_response(common.statusmessage(404), [])
-            self._write("Not Found")
+            self._start_response(pycompat.strurl(common.statusmessage(404)),
+                                 [])
+            self._write(b"Not Found")
             self._done()
             return