summaryrefslogtreecommitdiff
path: root/lib/chef/rest/rest_request.rb
diff options
context:
space:
mode:
authorJesse Campbell <hikeit@gmail.com>2013-03-05 15:02:30 -0500
committerJesse Campbell <hikeit@gmail.com>2013-03-05 15:02:30 -0500
commitd464608553c773154f0b586cda8d814c642ea1d1 (patch)
tree5be69876c1cc90616f37be90399f1deccbe637ee /lib/chef/rest/rest_request.rb
parentddf3acfee7b296df3e9b9692676e393e96f2f90a (diff)
downloadchef-d464608553c773154f0b586cda8d814c642ea1d1.tar.gz
don't include cgi, unnecessary
Diffstat (limited to 'lib/chef/rest/rest_request.rb')
-rw-r--r--lib/chef/rest/rest_request.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/rest/rest_request.rb b/lib/chef/rest/rest_request.rb
index fe9ba6f7b0..ff9738de99 100644
--- a/lib/chef/rest/rest_request.rb
+++ b/lib/chef/rest/rest_request.rb
@@ -21,7 +21,6 @@
# limitations under the License.
#
require 'uri'
-require 'cgi'
require 'net/http'
require 'chef/rest/cookie_jar'
@@ -222,8 +221,8 @@ class Chef
@http_request.body = request_body if (request_body && @http_request.request_body_permitted?)
# Optionally handle HTTP Basic Authentication
if url.user
- user = CGI.unescape(url.user)
- password = CGI.unescape(url.password) if url.password
+ user = URI.unescape(url.user)
+ password = URI.unescape(url.password) if url.password
@http_request.basic_auth(user, password)
end
@http_request[USER_AGENT] = self.class.user_agent