Skip to content

Commit 15030cf

Browse files
author
Ezra Zygmuntowicz
committed
account for when content length is 0
1 parent 6ffd4eb commit 15030cf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

chef/lib/chef/rest.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ def run_request(method, url, data=false, limit=10, raw=false)
130130
size += chunk.size
131131
if size == 0
132132
Chef::Log.debug("#{req.path} done (0 length file)")
133+
elsif total == 0
134+
Chef::Log.debug("#{req.path} (zero content length)")
133135
else
134136
Chef::Log.debug("#{req.path} %d%% done (%d of %d)" % [(size * 100) / total, size, total])
135137
end

0 commit comments

Comments
 (0)