summaryrefslogtreecommitdiff
path: root/lib/chef/provider/remote_file/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/remote_file/http.rb')
-rw-r--r--lib/chef/provider/remote_file/http.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/provider/remote_file/http.rb b/lib/chef/provider/remote_file/http.rb
index ad044f9e3c..4732253e5b 100644
--- a/lib/chef/provider/remote_file/http.rb
+++ b/lib/chef/provider/remote_file/http.rb
@@ -61,12 +61,13 @@ class Chef
def fetch
http = Chef::HTTP::Simple.new(uri, http_client_opts)
+ tempfile = Chef::FileContentManagement::Tempfile.new(@new_resource).tempfile
if want_progress?
- tempfile = http.streaming_request_with_progress(uri, headers) do |size, total|
+ tempfile = http.streaming_request_with_progress(uri, headers, tempfile) do |size, total|
events.resource_update_progress(new_resource, size, total, progress_interval)
end
else
- tempfile = http.streaming_request(uri, headers)
+ tempfile = http.streaming_request(uri, headers, tempfile)
end
if tempfile
update_cache_control_data(tempfile, http.last_response)