Comment 0 for bug 297623

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Landscape's staging server already supports gzip encoding in http(s) transfers, and we will put it in place in production too sometime soon.

In order to take advantage of this, the client needs to enable this support in curl. I did some tests and it seems this change is enough:

--- lib/fetch.py 2008-11-05 17:06:55.000000000 -0200
+++ lib/fetch.py 2008-11-11 19:18:04.000000000 -0200
@@ -39,6 +39,7 @@
     curl.setopt(pycurl.FOLLOWLOCATION, True)
     curl.setopt(pycurl.MAXREDIRS, 5)
     curl.setopt(pycurl.WRITEFUNCTION, input.write)
+ curl.setopt(pycurl.ENCODING, "gzip, deflate")
     curl.perform()

     return input.getvalue()