diff options
author | Brandon Raabe <brandocorp@gmail.com> | 2015-03-15 16:18:23 -0700 |
---|---|---|
committer | Brandon Raabe <brandocorp@gmail.com> | 2015-03-15 16:18:23 -0700 |
commit | 3ad167ec10e6374e645be74da1cc2f0b744f1aa6 (patch) | |
tree | ab248240f521abde9faf1cd60f6d6ee82eebd893 /lib | |
parent | 2d7f06196f9b611dd18fdb8825b251251fa195f2 (diff) | |
download | chef-3ad167ec10e6374e645be74da1cc2f0b744f1aa6.tar.gz |
add value of show_progress to the http_client_opts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/remote_file/http.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/provider/remote_file/http.rb b/lib/chef/provider/remote_file/http.rb index f17ab5a56d..8d5fe91f0a 100644 --- a/lib/chef/provider/remote_file/http.rb +++ b/lib/chef/provider/remote_file/http.rb @@ -78,6 +78,10 @@ class Chef @cache_control_data ||= CacheControlData.load_and_validate(uri, current_resource.checksum) end + def want_progress? + new_resource.show_progress + end + def want_mtime_cache_control? new_resource.use_last_modified end @@ -108,6 +112,10 @@ class Chef Chef::Log.debug("turning gzip compression off due to filename ending in gz") opts[:disable_gzip] = true end + if want_progress? + Chef::Log.debug("enabling progress output for streaming requests") + opts[:show_progress] = true + end opts end |