##// END OF EJS Templates
lfs: avoid quadratic performance in processing server responses...
Matt Harbison -
r44545:ffac09da default
parent child Browse files
Show More
@@ -503,7 +503,6 b' class _gitlfsremote(object):'
503 503 for k, v in headers:
504 504 request.add_header(pycompat.strurl(k), pycompat.strurl(v))
505 505
506 response = b''
507 506 try:
508 507 with contextlib.closing(self.urlopener.open(request)) as res:
509 508 contentlength = res.info().get(b"content-length")
@@ -520,11 +519,14 b' class _gitlfsremote(object):'
520 519 # blobstore
521 520 localstore.download(oid, res, contentlength)
522 521 else:
522 blocks = []
523 523 while True:
524 524 data = res.read(1048576)
525 525 if not data:
526 526 break
527 response += data
527 blocks.append(data)
528
529 response = b"".join(blocks)
528 530 if response:
529 531 ui.debug(b'lfs %s response: %s' % (action, response))
530 532 except util.urlerr.httperror as ex:
General Comments 0
You need to be logged in to leave comments. Login now