branch | stable |
changeset 37825 | e82b137a8b4e |
parent 37818 | 877185de62cf |
child 37828 | 3e3acf5d6a07 |
--- a/mercurial/hgweb/request.py Thu Apr 26 21:10:56 2018 +0900 +++ b/mercurial/hgweb/request.py Fri Apr 27 14:51:02 2018 -0700 @@ -313,7 +313,8 @@ if bodyfh is None: bodyfh = env['wsgi.input'] if 'Content-Length' in headers: - bodyfh = util.cappedreader(bodyfh, int(headers['Content-Length'])) + bodyfh = util.cappedreader(bodyfh, + int(headers['Content-Length'] or '0')) return parsedrequest(method=env['REQUEST_METHOD'], url=fullurl, baseurl=baseurl,