From d816614a151a4c74751d569e8d2ac48b941d5f46 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 13 Jun 2008 13:40:13 -0500 Subject: Fixing #1362 -- I had previously removed a stub point needed for testing. There was a save_object method in the http/handler module, but it seemed unnecessary and was undocumented. I don't know I missed it causing failures, but I've added it back with appropriate documention. --- lib/puppet/network/http/handler.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/puppet/network/http/handler.rb b/lib/puppet/network/http/handler.rb index 8c6abde8a..3c14c8a40 100644 --- a/lib/puppet/network/http/handler.rb +++ b/lib/puppet/network/http/handler.rb @@ -48,10 +48,16 @@ module Puppet::Network::HTTP::Handler raise ArgumentError, "No data to save" if !data or data.empty? args = params(request) obj = model.from_yaml(data) - result = obj.save(args).to_yaml + result = save_object(obj, args).to_yaml encode_result(request, response, result) end + # LAK:NOTE This has to be here for testing; it's a stub-point so + # we keep infinite recursion from happening. + def save_object(object, args) + object.save(args) + end + def do_exception(request, response, exception, status=404) encode_result(request, response, exception.to_yaml, status) end -- cgit