Skip to content

Commit

Permalink
fixed a bug wrt original_host_name storing
Browse files Browse the repository at this point in the history
  • Loading branch information
scrubber committed Jan 31, 2009
1 parent bb92f79 commit 90836a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/scrubyt/core/navigation/agents/mechanize.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def self.fetch(doc_url, *args)
end end


@@current_doc_url = doc_url @@current_doc_url = doc_url
@@current_doc_protocol ||= determine_protocol @@current_doc_protocol = determine_protocol


if mechanize_doc.nil? && @@current_doc_protocol != 'file' if mechanize_doc.nil? && @@current_doc_protocol != 'file'
handle_relative_path(doc_url) handle_relative_path(doc_url)
Expand All @@ -64,7 +64,7 @@ def self.fetch(doc_url, *args)
@@hpricot_doc = Hpricot(PreFilterDocument.br_to_newline(open(@@current_doc_url).read)) @@hpricot_doc = Hpricot(PreFilterDocument.br_to_newline(open(@@current_doc_url).read))
else else
@@hpricot_doc = Hpricot(PreFilterDocument.br_to_newline(@@mechanize_doc.body)) @@hpricot_doc = Hpricot(PreFilterDocument.br_to_newline(@@mechanize_doc.body))
store_host_name(self.get_current_doc_url) if self.get_current_doc_url # in case we're on a new host store_host_name(self.get_current_doc_url) #if self.get_current_doc_url # in case we're on a new host
end end
end end


Expand Down

0 comments on commit 90836a7

Please sign in to comment.