diff options
author | Luke Kanies <luke@madstop.com> | 2008-06-13 13:40:13 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-06-13 13:40:13 -0500 |
commit | d816614a151a4c74751d569e8d2ac48b941d5f46 (patch) | |
tree | dfdf27a05f9de4484e3c8ae6dfa7695b393424f0 | |
parent | 9b1301c0e86c66e17824b80f4afe598683e44a38 (diff) | |
download | puppet-d816614a151a4c74751d569e8d2ac48b941d5f46.tar.gz puppet-d816614a151a4c74751d569e8d2ac48b941d5f46.tar.xz puppet-d816614a151a4c74751d569e8d2ac48b941d5f46.zip |
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.
-rw-r--r-- | lib/puppet/network/http/handler.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |