Show More
@@ -111,6 +111,7 b' class httppeer(wireproto.wirepeer):' | |||
|
111 | 111 | self.ui.debug("sending %s command\n" % cmd) |
|
112 | 112 | q = [('cmd', cmd)] |
|
113 | 113 | headersize = 0 |
|
114 | varyheaders = [] | |
|
114 | 115 | # Important: don't use self.capable() here or else you end up |
|
115 | 116 | # with infinite recursion when trying to look up capabilities |
|
116 | 117 | # for the first time. |
@@ -137,13 +138,11 b' class httppeer(wireproto.wirepeer):' | |||
|
137 | 138 | headerfmt = 'X-HgArg-%s' |
|
138 | 139 | contentlen = headersize - len(headerfmt % '000' + ': \r\n') |
|
139 | 140 | headernum = 0 |
|
140 | varyheaders = [] | |
|
141 | 141 | for i in xrange(0, len(encargs), contentlen): |
|
142 | 142 | headernum += 1 |
|
143 | 143 | header = headerfmt % str(headernum) |
|
144 | 144 | headers[header] = encargs[i:i + contentlen] |
|
145 | 145 | varyheaders.append(header) |
|
146 | headers['Vary'] = ','.join(varyheaders) | |
|
147 | 146 | else: |
|
148 | 147 | q += sorted(args.items()) |
|
149 | 148 | qs = '?%s' % urlreq.urlencode(q) |
@@ -158,7 +157,10 b' class httppeer(wireproto.wirepeer):' | |||
|
158 | 157 | headers['X-HgHttp2'] = '1' |
|
159 | 158 | if data is not None and 'Content-Type' not in headers: |
|
160 | 159 | headers['Content-Type'] = 'application/mercurial-0.1' |
|
160 | ||
|
161 | headers['Vary'] = ','.join(varyheaders) | |
|
161 | 162 | req = self.requestbuilder(cu, data, headers) |
|
163 | ||
|
162 | 164 | if data is not None: |
|
163 | 165 | self.ui.debug("sending %s bytes\n" % size) |
|
164 | 166 | req.add_unredirected_header('Content-Length', '%d' % size) |
General Comments 0
You need to be logged in to leave comments.
Login now