From patchwork Fri Mar 11 16:55:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,5,postargs] httppeer: do less splitting on httpheader value From: Augie Fackler X-Patchwork-Id: 13798 Message-Id: <4c628e9d4647100d2bee.1457715312@arthedain.pit.corp.google.com> To: mercurial-devel@mercurial-scm.org Date: Fri, 11 Mar 2016 11:55:12 -0500 # HG changeset patch # User Augie Fackler # Date 1457713490 18000 # Fri Mar 11 11:24:50 2016 -0500 # Node ID 4c628e9d4647100d2beed4aeb53dd01e50bf4770 # Parent 8199ae50cd4b8bd89bf3d9b836ee10b9e49ba759 # EXP-Topic batch httppeer: do less splitting on httpheader value We only care about the first value split off, so only split off the first value. diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -112,7 +112,7 @@ class httppeer(wireproto.wirepeer): if len(args) > 0: httpheader = self.capable('httpheader') if httpheader: - headersize = int(httpheader.split(',')[0]) + headersize = int(httpheader.split(',', 1)[0]) if headersize > 0: # The headers can typically carry more data than the URL. encargs = urllib.urlencode(sorted(args.items()))