diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-09 18:00:33 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-09 18:00:33 +0100 |
commit | 4ab9088e21ecfdd1194d6c60a9857962a82d2895 (patch) | |
tree | 6ccf0c4491260f29d0ab1c3b345ecebbcd886494 /module/network | |
parent | fixed chunk range (diff) | |
download | pyload-4ab9088e21ecfdd1194d6c60a9857962a82d2895.tar.xz |
disabled chunk download for files.mail.ru
Diffstat (limited to 'module/network')
-rw-r--r-- | module/network/HTTPChunk.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index 72c6427e8..573ed1766 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -142,8 +142,6 @@ class HTTPChunk(HTTPRequest): self.c.setopt(pycurl.WRITEFUNCTION, self.writeBody) self.c.setopt(pycurl.HEADERFUNCTION, self.writeHeader) - # request one byte more, since some servers in russia seems to have a defect arihmetic unit - if self.resume: self.fp = open(self.p.info.getChunkName(self.id), "ab") self.arrived = self.fp.tell() @@ -152,7 +150,7 @@ class HTTPChunk(HTTPRequest): #do nothing if chunk already finished if not self.arrived + self.range[0] - self.range[1]: return None - range = "%i-%i" % (self.arrived + self.range[0], min(self.range[1] + 1, self.p.size-1)) + range = "%i-%i" % (self.arrived + self.range[0], self.range[1]) print "Chunked resume with range %s" % range self.c.setopt(pycurl.RANGE, range) else: @@ -161,7 +159,7 @@ class HTTPChunk(HTTPRequest): else: if self.range: - range = "%i-%i" % (self.range[0], min(self.range[1] + 1, self.p.size-1)) + range = "%i-%i" % self.range print "Chunked with range %s" % range self.c.setopt(pycurl.RANGE, range) |