diff --git a/modules/openstack_project/files/logstash/log-gearman-worker.py b/modules/openstack_project/files/logstash/log-gearman-worker.py index 03d7af6c39..a73d800db3 100644 --- a/modules/openstack_project/files/logstash/log-gearman-worker.py +++ b/modules/openstack_project/files/logstash/log-gearman-worker.py @@ -123,6 +123,8 @@ class LogRetriever(threading.Thread): try: logging.debug("Retrieving: " + source_url) r = urllib2.urlopen(source_url) + if 'gzip' in r.info().get('Content-Type', ''): + gzipped = True except urllib2.URLError: try: logging.debug("Retrieving: " + source_url + ".gz")