summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/http/handler.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2011-01-10 18:30:42 -0800
committerPaul Berry <paul@puppetlabs.com>2011-01-11 11:41:46 -0800
commita002231f45339da9b152162c2f48126d95e2e246 (patch)
treecf51e75f954847fda264b561a7a3acdfa5869dda /lib/puppet/network/http/handler.rb
parente6e88e7df7fa1cbec1400d73cb7ba9428c420be0 (diff)
downloadpuppet-a002231f45339da9b152162c2f48126d95e2e246.tar.gz
puppet-a002231f45339da9b152162c2f48126d95e2e246.tar.xz
puppet-a002231f45339da9b152162c2f48126d95e2e246.zip
(#5171) Made filebucket able to perform diffs
It is now possible to ask the filebucket to diff two files using a URL of the form: https://puppet/production/file_bucket_file/md5/{first file hash}?diff_with={second file hash} The returned diff is a string, the output of the "diff" command. Paired-with: Paul Berry <paul@puppetlabs.com>
Diffstat (limited to 'lib/puppet/network/http/handler.rb')
-rw-r--r--lib/puppet/network/http/handler.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/network/http/handler.rb b/lib/puppet/network/http/handler.rb
index 61ae2d2fc..f22498b70 100644
--- a/lib/puppet/network/http/handler.rb
+++ b/lib/puppet/network/http/handler.rb
@@ -109,7 +109,11 @@ module Puppet::Network::HTTP::Handler
format = format_to_use(request)
set_content_type(response, format)
- set_response(response, result.render(format))
+ if result.respond_to?(:render)
+ set_response(response, result.render(format))
+ else
+ set_response(response, result)
+ end
end
# Execute our search.