diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-08 15:06:23 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-08 15:06:23 +0100 |
commit | 8f27d644fadcb8beb3dcd65c4a04073fa40fcdd2 (patch) | |
tree | 47a4752c11811c2166350c032da3d18fa6d7d2ae | |
parent | new buttons to (remove finished/restart failed) links (diff) | |
download | pyload-8f27d644fadcb8beb3dcd65c4a04073fa40fcdd2.tar.xz |
added check to remove byte order mark (fixes fileserv)
-rw-r--r-- | module/network/HTTPChunk.py | 11 | ||||
-rwxr-xr-x | pyLoadCore.py | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index 1cc9841a6..07012d072 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -128,6 +128,9 @@ class HTTPChunk(HTTPRequest): self.initHandle() self.setInterface(self.p.interface, self.p.proxies) + self.BOMChecked = False + # check and remove byte order mark + @property def cj(self): return self.p.cj @@ -174,6 +177,14 @@ class HTTPChunk(HTTPRequest): self.headerParsed = True def writeBody(self, buf): + + #ignore BOM, it confuses unrar + if not self.BOMChecked: + byte = bytearray(buf[:3]) + if tuple(byte) == (239,187,191): + buf = buf[3:] + self.BOMChecked = True + size = len(buf) self.arrived += size diff --git a/pyLoadCore.py b/pyLoadCore.py index 259e2cd0c..5923a3d7f 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -373,8 +373,6 @@ class Core(object): self.scheduler.addJob(0, self.accountManager.getAccountInfos) - self.server_methods.delete_finished() - while True: sleep(2) if self.do_restart: |