summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-11-19 16:55:31 -0800
committerSerdar Sutay <serdar@opscode.com>2014-11-19 16:55:31 -0800
commit584a6717e471465bfa6b44177087c3ee88db96c8 (patch)
tree4c693384450be75116ede496348ff4a543947f51
parent8a84e6835f3d3d1550fc707bb75439482ffe8068 (diff)
downloadchef-sersut/audit-integ.tar.gz
Remove compression since the server doesn't support it yet.sersut/audit-integ
-rw-r--r--lib/chef/audit/audit_reporter.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb
index 40776ebefb..28a9940af4 100644
--- a/lib/chef/audit/audit_reporter.rb
+++ b/lib/chef/audit/audit_reporter.rb
@@ -100,11 +100,10 @@ class Chef
end
Chef::Log.debug "Audit Report:\n#{Chef::JSONCompat.to_json_pretty(run_data)}"
- compressed_data = encode_gzip(Chef::JSONCompat.to_json(run_data))
# Since we're posting compressed data we can not directly call post_rest which expects JSON
- audit_url = rest_client.create_url(audit_history_url)
begin
- rest_client.raw_http_request(:POST, audit_url, headers({'Content-Encoding' => 'gzip'}), compressed_data)
+ audit_url = rest_client.create_url(audit_history_url)
+ rest_client.post(audit_url, run_data, headers)
rescue StandardError => e
if e.respond_to? :response
code = e.response.code.nil? ? "Exception Code Empty" : e.response.code