Patchwork D2291: hgweb: correctly bytes-ify status, not string-ify

login
register
mail settings
Submitter phabricator
Date Feb. 17, 2018, 9:54 a.m.
Message ID <1ae398b80c0500f0452efab06debc93d@localhost.localdomain>
Download mbox | patch
Permalink /patch/28016/
State Not Applicable
Headers show

Comments

phabricator - Feb. 17, 2018, 9:54 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9a97ad537561: hgweb: correctly bytes-ify status, not string-ify (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2291?vs=5796&id=5803

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

AFFECTED FILES
  mercurial/hgweb/request.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -115,7 +115,7 @@ 
                     self.headers = [(k, v) for (k, v) in self.headers if
                                     k in ('Date', 'ETag', 'Expires',
                                           'Cache-Control', 'Vary')]
-                status = statusmessage(status.code, str(status))
+                status = statusmessage(status.code, pycompat.bytestr(status))
             elif status == 200:
                 status = '200 Script output follows'
             elif isinstance(status, int):