Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/server.py @ 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 | 48f1b314056b |
children | a3c856e2ea2f |
comparison
equal
deleted
inserted
replaced
49971:ac93876ea2df | 49973:68cf519429ef |
---|---|
201 if hval: | 201 if hval: |
202 env[hkey] = hval | 202 env[hkey] = hval |
203 env['SERVER_PROTOCOL'] = self.request_version | 203 env['SERVER_PROTOCOL'] = self.request_version |
204 env['wsgi.version'] = (1, 0) | 204 env['wsgi.version'] = (1, 0) |
205 env['wsgi.url_scheme'] = pycompat.sysstr(self.url_scheme) | 205 env['wsgi.url_scheme'] = pycompat.sysstr(self.url_scheme) |
206 if env.get('HTTP_EXPECT', b'').lower() == b'100-continue': | 206 if env.get('HTTP_EXPECT', '').lower() == '100-continue': |
207 self.rfile = common.continuereader(self.rfile, self.wfile.write) | 207 self.rfile = common.continuereader(self.rfile, self.wfile.write) |
208 | 208 |
209 env['wsgi.input'] = self.rfile | 209 env['wsgi.input'] = self.rfile |
210 env['wsgi.errors'] = _error_logger(self) | 210 env['wsgi.errors'] = _error_logger(self) |
211 env['wsgi.multithread'] = isinstance( | 211 env['wsgi.multithread'] = isinstance( |