Skip to content

Commit

Permalink
Get rid of obsolete URI.escape
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink committed Jul 15, 2020
1 parent c488607 commit 1cfb5bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/catalog-diff/compilecatalog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_catalog_from_puppetdb(node_name, server)
_server, environment = server.split('/')
environment ||= lookup_environment(node_name)
query.concat([['=', 'environment', environment]])
json_query = URI.escape(query.to_json)
json_query = URI.encode_www_form_component(query.to_json)
ret = connection.request_get("/pdb/query/v4/catalogs?query=#{json_query}", 'Accept' => 'application/json').body
begin
catalog = PSON.parse(ret)
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/catalog-diff/searchfacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def find_nodes_puppetdb(env)
['=', 'title', capit]]]]]],
)
end
json_query = URI.escape(query.to_json)
json_query = URI.encode_www_form_component(query.to_json)
begin
filtered = PSON.parse(connection.request_get("/pdb/query/v4/nodes?query=#{json_query}", 'Accept' => 'application/json').body)
rescue PSON::ParserError => e
Expand Down

0 comments on commit 1cfb5bc

Please sign in to comment.