Skip to content

Commit cbf9c7b

Browse files
gerasesSergei Gerasenko
authored and
Sergei Gerasenko
committed
Use the read method on the return of open_url to actually get the content.
1 parent 802eb9a commit cbf9c7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/parser/functions/loadjson.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module Puppet::Parser::Functions
4444
url = args[0]
4545
end
4646
begin
47-
contents = OpenURI.open_uri(url, http_options)
47+
contents = OpenURI.open_uri(url, http_options).read
4848
rescue OpenURI::HTTPError => e
4949
res = e.io
5050
warning("Can't load '#{url}' HTTP Error Code: '#{res.status[0]}'")

0 commit comments

Comments
 (0)