From 9bc4bcefb1a9f2545b4828dcea7a41ef450e7d52 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Wed, 13 Apr 2011 18:46:55 -0700 Subject: (#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 --- lib/puppet/network/http/handler.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/puppet') 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 -- cgit