diff options
author | Nick Lewis <nick@puppetlabs.com> | 2011-04-13 18:46:55 -0700 |
---|---|---|
committer | Nick Lewis <nick@puppetlabs.com> | 2011-04-13 19:09:48 -0700 |
commit | 9bc4bcefb1a9f2545b4828dcea7a41ef450e7d52 (patch) | |
tree | 7657ff423ac8783880550c3f4990593fdad0c253 /lib/puppet/network/http/handler.rb | |
parent | 7817ccb3438ad2742a98694373e42b65df86eda7 (diff) | |
download | puppet-9bc4bcefb1a9f2545b4828dcea7a41ef450e7d52.tar.gz puppet-9bc4bcefb1a9f2545b4828dcea7a41ef450e7d52.tar.xz puppet-9bc4bcefb1a9f2545b4828dcea7a41ef450e7d52.zip |
(#7103) Fix HEAD requests in the HTTP handler
HEAD request support was implemented in 2.6.x, and the internal API in the HTTP
handler changed in 2.7.x. So when the branches were merged together, HEAD
requests ended up using the wrong API without any visible merge conflicts or
spec failures. This fixes them to use the correct API.
Reviewed-By: Matt Robinson
Diffstat (limited to 'lib/puppet/network/http/handler.rb')
-rw-r--r-- | lib/puppet/network/http/handler.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/network/http/handler.rb b/lib/puppet/network/http/handler.rb index 2b9e81b61..2c78a0283 100644 --- a/lib/puppet/network/http/handler.rb +++ b/lib/puppet/network/http/handler.rb @@ -122,10 +122,10 @@ module Puppet::Network::HTTP::Handler end # Execute our head. - def do_head(indirection_request, request, response) - unless indirection_request.model.head(indirection_request.key, indirection_request.to_hash) - Puppet.info("Could not find #{indirection_request.indirection_name} for '#{indirection_request.key}'") - return do_exception(response, "Could not find #{indirection_request.indirection_name} #{indirection_request.key}", 404) + def do_head(indirection_name, key, params, request, response) + unless self.model(indirection_name).indirection.head(key, params) + Puppet.info("Could not find #{indirection_name} for '#{key}'") + return do_exception(response, "Could not find #{indirection_name} #{key}", 404) end # No need to set a response because no response is expected from a |