diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-08-17 21:46:15 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-08-17 21:46:15 +0200 |
commit | 6ac0ff839cfbeb4219fe67c1640d2bde13e84316 (patch) | |
tree | 0f0e82a26d88f047406eab9ef15c1c4703c71a29 /module/network/Request.py | |
parent | ~ (diff) | |
download | pyload-6ac0ff839cfbeb4219fe67c1640d2bde13e84316.tar.xz |
~
Diffstat (limited to 'module/network/Request.py')
-rwxr-xr-x | module/network/Request.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/module/network/Request.py b/module/network/Request.py index d4d32a4a1..85aa851fe 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -283,10 +283,6 @@ class Request: def write_header(self, string): self.header += string - try: - self.dl_size = int(re.findall(r"Content-Length:.([0-9]+)", self.header, re.IGNORECASE)[0]) - except: - self.dl_size = 0 def get_rep(self): value = self.rep.getvalue() @@ -317,6 +313,7 @@ class Request: def progress(self, dl_t, dl_d, up_t, up_d): if self.abort: raise AbortDownload self.dl_arrived = int(dl_d) + self.dl_size = int(dl_t) if __name__ == "__main__": import doctest |