From 584a6717e471465bfa6b44177087c3ee88db96c8 Mon Sep 17 00:00:00 2001 From: Serdar Sutay Date: Wed, 19 Nov 2014 16:55:31 -0800 Subject: Remove compression since the server doesn't support it yet. --- lib/chef/audit/audit_reporter.rb | 5 ++--- 1 file 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 -- cgit v1.2.1