From 089ac3e37dd1418751bc4dfe152e09fbacbc5122 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 18 Sep 2009 12:48:12 -0700 Subject: Fixing #2617 - using the searched-for REST name This allows a separation between the wrapper class and its internals, which is (at least) necessary for the CA cert, which might not be found using the internal name. Signed-off-by: Luke Kanies --- lib/puppet/indirector/rest.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/indirector/rest.rb b/lib/puppet/indirector/rest.rb index e1ee89f04..a89e98606 100644 --- a/lib/puppet/indirector/rest.rb +++ b/lib/puppet/indirector/rest.rb @@ -66,7 +66,9 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus end def find(request) - deserialize network(request).get(indirection2uri(request), headers) + return nil unless result = deserialize(network(request).get(indirection2uri(request), headers)) + result.name = request.key + result end def search(request) -- cgit