Mercurial > hg
changeset 49973:68cf519429ef stable
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 03 Feb 2023 01:07:59 -0500 |
parents | ac93876ea2df |
children | b5ecd0bcbcd7 |
files | mercurial/hgweb/server.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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