Show More
@@ -19,6 +19,7 b' from . import (' | |||
|
19 | 19 | manifest, |
|
20 | 20 | namespaces, |
|
21 | 21 | pathutil, |
|
22 | pycompat, | |
|
22 | 23 | url, |
|
23 | 24 | util, |
|
24 | 25 | vfs as vfsmod, |
@@ -44,12 +45,12 b' class httprangereader(object):' | |||
|
44 | 45 | def seek(self, pos): |
|
45 | 46 | self.pos = pos |
|
46 | 47 | def read(self, bytes=None): |
|
47 | req = urlreq.request(self.url) | |
|
48 | req = urlreq.request(pycompat.strurl(self.url)) | |
|
48 | 49 | end = '' |
|
49 | 50 | if bytes: |
|
50 | 51 | end = self.pos + bytes - 1 |
|
51 | 52 | if self.pos or end: |
|
52 | req.add_header('Range', 'bytes=%d-%s' % (self.pos, end)) | |
|
53 | req.add_header(r'Range', r'bytes=%d-%s' % (self.pos, end)) | |
|
53 | 54 | |
|
54 | 55 | try: |
|
55 | 56 | f = self.opener.open(req) |
General Comments 0
You need to be logged in to leave comments.
Login now