mercurial/httppeer.py
changeset 28486 50314dc3ae4e
parent 28485 d3893900f6c8
child 28530 fd2acc5046f6
--- a/mercurial/httppeer.py	Fri Mar 11 11:33:43 2016 -0500
+++ b/mercurial/httppeer.py	Fri Mar 11 11:51:22 2016 -0500
@@ -108,12 +108,12 @@
                 headerfmt = 'X-HgArg-%s'
                 contentlen = headersize - len(headerfmt % '000' + ': \r\n')
                 headernum = 0
+                varyheaders = []
                 for i in xrange(0, len(encargs), contentlen):
                     headernum += 1
                     header = headerfmt % str(headernum)
                     headers[header] = encargs[i:i + contentlen]
-                varyheaders = [
-                    headerfmt % str(h) for h in range(1, headernum + 1)]
+                    varyheaders.append(header)
                 headers['Vary'] = ','.join(varyheaders)
             else:
                 q += sorted(args.items())