# File lib/scrubyt/core/navigation/agents/mechanize.rb, line 125 def self.determine_protocol old_protocol = @@current_doc_protocol new_protocol = case @@current_doc_url when /^https/ 'https' when /^http/ 'http' when /^www/ 'http' else 'file' end return 'http' if ((old_protocol == 'http') && new_protocol == 'file') return 'https' if ((old_protocol == 'https') && new_protocol == 'file') new_protocol end