D2744: hgweb: handle CONTENT_LENGTH

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Mar 9 17:14:59 EST 2018


durin42 accepted this revision.
durin42 added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> wireprotoserver.py:94
>      def forwardpayload(self, fp):
> -        if b'Content-Length' in self._req.headers:
> -            length = int(self._req.headers[b'Content-Length'])
> -        else:
> -            length = int(self._wsgireq.env[r'CONTENT_LENGTH'])
> +        # TODO Content-Length may not always be defined.
> +        length = int(self._req.headers[b'Content-Length'])

For our clients it always will, because we precompute the bundle to a file. It's gross.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2744

To: indygreg, #hg-reviewers, durin42
Cc: durin42, mercurial-devel


More information about the Mercurial-devel mailing list