changeset 38298:af0e88e64ede

hgweb: insist http_status value is a sysstr My previous change was extremely confusing to figure out, because I thought I was looking at a client-side problem. For the low cost of an isinstance assert, we can make those errors not happen in the future. Differential Revision: https://phab.mercurial-scm.org/D3727
author Augie Fackler <augie@google.com>
date Tue, 12 Jun 2018 20:43:56 -0400
parents 9f499d28efb4
children 88e7105b5cd9
files mercurial/hgweb/server.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/server.py	Tue Jun 12 20:42:42 2018 -0400
+++ b/mercurial/hgweb/server.py	Tue Jun 12 20:43:56 2018 -0400
@@ -215,6 +215,7 @@
         self.sent_headers = True
 
     def _start_response(self, http_status, headers, exc_info=None):
+        assert isinstance(http_status, str)
         code, msg = http_status.split(None, 1)
         code = int(code)
         self.saved_status = http_status