changeset 38595:b263133eeb5a

py3: convert server-string to unicode to make http library happy
author Yuya Nishihara <yuya@tcha.org>
date Sun, 08 Jul 2018 16:55:21 +0900
parents e46c3b6a47b5
children f8b46245b26a
files mercurial/hgweb/server.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/server.py	Sun Jul 08 16:45:40 2018 +0900
+++ b/mercurial/hgweb/server.py	Sun Jul 08 16:55:21 2018 +0900
@@ -246,7 +246,7 @@
 
     def version_string(self):
         if self.server.serverheader:
-            return self.server.serverheader
+            return encoding.strfromlocal(self.server.serverheader)
         return httpservermod.basehttprequesthandler.version_string(self)
 
 class _httprequesthandlerssl(_httprequesthandler):