From f6b9f38326322d3999c0f927db67e182a45625f5 Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Fri, 23 Oct 2015 19:38:17 -0500 Subject: [PATCH] This method is not needed because Nokogiri does that already --- lib/rex/proto/http/response.rb | 10 ---------- spec/lib/rex/proto/http/response_spec.rb | 14 +------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/lib/rex/proto/http/response.rb b/lib/rex/proto/http/response.rb index 70395a36a3..e88331b7a8 100644 --- a/lib/rex/proto/http/response.rb +++ b/lib/rex/proto/http/response.rb @@ -119,16 +119,6 @@ class Response < Packet json end - # Returns the title from the HTML document. - # You will probably want to use this if you want to grab the web app's banner in the title. - # - # @return [String] - def get_html_title - n = get_html_document - title = n.at_xpath('//title') - title ? title.text : '' - end - # Returns meta tags. # You will probably want to use this the web app's version info (or other stuff) can be found # in the metadata. diff --git a/spec/lib/rex/proto/http/response_spec.rb b/spec/lib/rex/proto/http/response_spec.rb index 0039276445..0b9ec02a58 100644 --- a/spec/lib/rex/proto/http/response_spec.rb +++ b/spec/lib/rex/proto/http/response_spec.rb @@ -133,10 +133,6 @@ describe Rex::Proto::Http::Response do HEREDOC end - let (:html_title) do - 'TEST' - end - let (:meta_name) do 'META_NAME' end @@ -149,7 +145,7 @@ describe Rex::Proto::Http::Response do %Q| - #{html_title} + TEST @@ -267,14 +263,6 @@ describe Rex::Proto::Http::Response do end end - describe '#get_html_title' do - context "when the title in the HTML is 'TEST'" do - it "returns 'TEST'" do - expect(subject.get_html_title).to eq(html_title) - end - end - end - describe '#get_html_meta_elements' do let(:meta_elements) do subject.get_html_meta_elements