Handle html log annotations.

* modules/openstack_project/files/logstash/log-gearman-worker.py:
The annotated logs served by logs-dev and soon to be served to logs.o.o
return .txt files gzipped. log-gearman-worker.py needs to check the
Content-Type in the reponse headers to see if the txt files were gzipped
in order to properly handle this.

partial-bug: #1207047
Change-Id: I5981cde145a572a6e3d20e8369e407df151143ff
This commit is contained in:
Clark Boylan 2013-07-31 11:23:19 -07:00
parent c28c8933ab
commit a20c139f3d

View File

@ -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")