hgweb: unbyteify the 100-continue check stable
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 03 Feb 2023 01:07:59 -0500
branchstable
changeset 49973 68cf519429ef
parent 49971 ac93876ea2df
child 49977 b5ecd0bcbcd7
hgweb: unbyteify the 100-continue check The environment seems to be `str` or `tuple[int]`, and the same check in `wsgicgi.py` is already `str` based, so I suspect this was wrong. I think what happened here is that the string wasn't `r''` prefixed in 482d6f6dba91 like `wsgicgi.py`, so it got wrongly byteified in 687b865b95ad when converting to byte literals en masse.
mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py	Mon Jan 30 18:50:11 2023 +0100
+++ b/mercurial/hgweb/server.py	Fri Feb 03 01:07:59 2023 -0500
@@ -203,7 +203,7 @@
         env['SERVER_PROTOCOL'] = self.request_version
         env['wsgi.version'] = (1, 0)
         env['wsgi.url_scheme'] = pycompat.sysstr(self.url_scheme)
-        if env.get('HTTP_EXPECT', b'').lower() == b'100-continue':
+        if env.get('HTTP_EXPECT', '').lower() == '100-continue':
             self.rfile = common.continuereader(self.rfile, self.wfile.write)
 
         env['wsgi.input'] = self.rfile