mercurial/statichttprepo.py
changeset 43506 9f70512ae2cf
parent 43077 687b865b95ad
child 45434 5523e3e1bc71
equal deleted inserted replaced
43505:47fac1692ede 43506:9f70512ae2cf
    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