D3432: hgweb: guard against empty Content-Length header
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Mon Apr 30 10:48:14 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe82b137a8b4e: hgweb: guard against empty Content-Length header (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3432?vs=8439&id=8440
REVISION DETAIL
https://phab.mercurial-scm.org/D3432
AFFECTED FILES
mercurial/hgweb/request.py
CHANGE DETAILS
diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -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,
To: indygreg, #hg-reviewers, durin42
Cc: mharbison72, mercurial-devel
More information about the Mercurial-devel
mailing list