Fix use of Range header in log-pusher.py.

* modules/openstack_project/files/logstash/log-pusher.py: The Range http
header was not properly applied, fix it.

Change-Id: I9ccccd57f7d72853dfbce0c1593737e0f6495724
Reviewed-on: https://review.openstack.org/26668
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2013-04-10 13:29:12 -07:00 committed by Jenkins
parent da9eba6e53
commit bdb1066d0a

View File

@ -157,7 +157,7 @@ class LogRetriever(threading.Thread):
# Try for up to 60 seconds to retrieve the complete log file.
try:
req = urllib.request.Request(source_url)
req.add_header('bytes', str(content_len) + '-')
req.add_header('Range', 'bytes=' + str(content_len) + '-')
r = urllib.request.urlopen(req)
raw_buf += r.read()
content_len = len(raw_buf)