equal
deleted
inserted
replaced
51 req = urlreq.request(pycompat.strurl(self.url)) |
51 req = urlreq.request(pycompat.strurl(self.url)) |
52 end = b'' |
52 end = b'' |
53 if bytes: |
53 if bytes: |
54 end = self.pos + bytes - 1 |
54 end = self.pos + bytes - 1 |
55 if self.pos or end: |
55 if self.pos or end: |
56 req.add_header(r'Range', r'bytes=%d-%s' % (self.pos, end)) |
56 req.add_header('Range', 'bytes=%d-%s' % (self.pos, end)) |
57 |
57 |
58 try: |
58 try: |
59 f = self.opener.open(req) |
59 f = self.opener.open(req) |
60 data = f.read() |
60 data = f.read() |
61 code = f.code |
61 code = f.code |