From efc589c1e2133279eeee75ea5f0ebb96ee4395d6 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 23 Apr 2012 03:53:50 -0500 Subject: [PATCH] Fix up Net::HTTP usage so that it works with newer ruby as well --- lib/rapid7/nexpose.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rapid7/nexpose.rb b/lib/rapid7/nexpose.rb index e0ab73ab1c..c3e5057621 100644 --- a/lib/rapid7/nexpose.rb +++ b/lib/rapid7/nexpose.rb @@ -663,8 +663,8 @@ class Connection http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE # XXX: security issue headers = {'Cookie' => "nexposeCCSessionID=#{@session_id}"} - resp, data = http.get(uri.path, headers) - data + resp = http.get(uri.path, headers) + resp ? resp.body : nil end end