Patchwork D3343: hgweb: these strings should be sysstrs, not bytes

login
register
mail settings
Submitter phabricator
Date April 16, 2018, 8:17 p.m.
Message ID <bcc1e4a263d5a087954c5c4e2f1c0ee0@localhost.localdomain>
Download mbox | patch
Permalink /patch/31101/
State Not Applicable
Headers show

Comments

phabricator - April 16, 2018, 8:17 p.m.
durin42 updated this revision to Diff 8311.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3343?vs=8220&id=8311

REVISION DETAIL
  https://phab.mercurial-scm.org/D3343

AFFECTED FILES
  mercurial/hgweb/common.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py
+++ b/mercurial/hgweb/common.py
@@ -133,7 +133,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))