lib/bio/appl/blast/genomenet.rb in bio-1.5.1 vs lib/bio/appl/blast/genomenet.rb in bio-1.5.2
- old
+ new
@@ -100,11 +100,11 @@
end
databases = {}
dbdescs = {}
key = nil
host = Bio::Blast::Remote::Genomenet::Host
- http = Bio::Command.new_http(host)
+ http = Bio::Command.new_https(host)
result = http.get('/tools/blast/')
#p result.body
result.body.each_line do |line|
case line
when /\"set\_dbtype\(this\.form\,\'(prot|nucl)\'\)\"/
@@ -209,11 +209,11 @@
form.keys.each do |k|
form.delete(k) unless form[k]
end
begin
- http = Bio::Command.new_http(host)
+ http = Bio::Command.new_https(host)
http.open_timeout = 300
http.read_timeout = 600
result = Bio::Command.http_post_form(http, path, form)
@output = result.body
@@ -241,13 +241,13 @@
@output = result.body
end
end
# workaround 2005.08.12 + 2011.01.27 + 2011.7.22
- if /\<A +HREF=\"(http\:\/\/[\-\.a-z0-9]+\.genome\.jp)?(\/tmp\/[^\"]+)\"\>Show all result\<\/A\>/i =~ @output.to_s then
+ if /\<A +HREF=\"(https?\:\/\/[\-\.a-z0-9]+\.genome\.jp)?(\/tmp\/[^\"]+)\"\>Show all result\<\/A\>/i =~ @output.to_s then
all_prefix = $1
all_path = $2
- all_prefix = "http://#{Host}" if all_prefix.to_s.empty?
+ all_prefix = "https://#{Host}" if all_prefix.to_s.empty?
all_uri = all_prefix + all_path
@output = Bio::Command.read_uri(all_uri)
case all_path
when /\.txt\z/
; # don't touch the data