Author: johnnyg
Revision: 6101
Log:
Make sure all data is passed to pagePart. Accept x-gzip encodings.
Diff:
Modified: trunk/deluge/httpdownloader.py
===================================================================
--- trunk/deluge/httpdownloader.py 2010-01-20 12:08:29 UTC (rev 6100)
+++ trunk/deluge/httpdownloader.py 2010-01-20 12:36:07 UTC (rev 6101)
@@ -113,7 +113,10 @@
def pageEnd(self):
if self.decoder:
- client.HTTPDownloader.pagePart(self, self.decoder.flush())
+ data = self.decoder.flush()
+ self.current_length -= len(data)
+ self.decoder = None
+ self.pagePart(data)
return client.HTTPDownloader.pageEnd(self)
@@ -185,7 +188,7 @@
if allow_compression:
if not headers:
headers = {}
- headers["accept-encoding"] = "gzip, deflate"
+ headers["accept-encoding"] = "deflate, gzip, x-gzip"
scheme, host, port, path = client._parse(url)
factory = HTTPDownloader(url, filename, callback, headers, force_filename,
allow_compression)
--
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en.