diff -r ed0456fde625 -r 16292bbda39c mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py Sat Mar 10 10:45:12 2018 -0800 +++ b/mercurial/wireprotoserver.py Sat Mar 10 10:44:56 2018 -0800 @@ -324,7 +324,7 @@ # the HTTP response. In other words, it helps prevent deadlocks # on clients using httplib. - if (wsgireq.env[r'REQUEST_METHOD'] == r'POST' and + if (req.method == 'POST' and # But not if Expect: 100-continue is being used. (req.headers.get('Expect', '').lower() != '100-continue')): wsgireq.drain()