summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-04-24 15:07:23 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-05-04 10:57:09 -0700
commita874fce5a4f7e79f7319e5959b6802ad48c45344 (patch)
treed919ff6fa67e22dca22fa55dd868280398065530 /lib/chef/node.rb
parente2b7e4e76cd8dae088299137d991a0455d87a109 (diff)
downloadchef-a874fce5a4f7e79f7319e5959b6802ad48c45344.tar.gz
use validate_utf8=false option to json encoder for node
with validation off any bad utf8 data will not cause the ffi-yajl encoder to raise. with ffi-yajl >= 2.2.0 the bad data will be scrubbed to produce valid JSON to POST/PUT to the server.
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r--lib/chef/node.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index 9823185ede..cc79a187a9 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -83,7 +83,7 @@ class Chef
end
def chef_server_rest
- @chef_server_rest ||= Chef::REST.new(Chef::Config[:chef_server_url])
+ @chef_server_rest ||= Chef::REST.new(Chef::Config[:chef_server_url], Chef::Config[:node_name], Chef::Config[:client_key], validate_utf8: false)
end
# Set the name of this Node, or return the current name.