##// END OF EJS Templates
httppeer: do decompression inside _callstream...
Gregory Szorc -
r30464:e16e234b default
parent child Browse files
Show More
@@ -90,7 +90,7 class httppeer(wireproto.wirepeer):
90 90 def lock(self):
91 91 raise error.Abort(_('operation not supported over http'))
92 92
93 def _callstream(self, cmd, **args):
93 def _callstream(self, cmd, _compressible=False, **args):
94 94 if cmd == 'pushkey':
95 95 args['data'] = ''
96 96 data = args.pop('data', None)
@@ -201,6 +201,9 class httppeer(wireproto.wirepeer):
201 201 raise error.RepoError(_("'%s' uses newer protocol %s") %
202 202 (safeurl, version))
203 203
204 if _compressible:
205 return util.chunkbuffer(zgenerator(resp))
206
204 207 return resp
205 208
206 209 def _call(self, cmd, **args):
@@ -271,8 +274,7 class httppeer(wireproto.wirepeer):
271 274 os.unlink(filename)
272 275
273 276 def _callcompressable(self, cmd, **args):
274 stream = self._callstream(cmd, **args)
275 return util.chunkbuffer(zgenerator(stream))
277 return self._callstream(cmd, _compressible=True, **args)
276 278
277 279 def _abort(self, exception):
278 280 raise exception
General Comments 0
You need to be logged in to leave comments. Login now