diff options
author | Claire McQuin <claire@getchef.com> | 2014-01-23 16:57:47 -0800 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-01-23 16:57:47 -0800 |
commit | 963c3d55ce11f5d00a59b216e026d1bf87e7217a (patch) | |
tree | bfa44790eaa368f1390582b20332b7618ee6928a /lib/chef/http | |
parent | 50b163117b6a2ca7b3325e207a16c03fd7449dad (diff) | |
download | chef-963c3d55ce11f5d00a59b216e026d1bf87e7217a.tar.gz |
add real error for bad download size
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/validate_response.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http/validate_response.rb b/lib/chef/http/validate_response.rb index 436334ab7a..1eaef3fa91 100644 --- a/lib/chef/http/validate_response.rb +++ b/lib/chef/http/validate_response.rb @@ -82,7 +82,7 @@ class Chef Chef::Log.debug "Content-Length header = #{content_length}" Chef::Log.debug "Response body length = #{response_length}" if response_length != content_length - raise "Response body length #{response_length} does not match HTTP Content-Length header #{content_length}" #FIXME: real exception + raise Chef::Exceptions::ContentLengthMismatch, "Response body length #{response_length} does not match HTTP Content-Length header #{content_length}." end true end |