Commit 3e6693f4 authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Use https for NCBI blast queries

parent dc701484
......@@ -436,7 +436,7 @@ sub WEB_BLAST {
#-- BUILD THE REQUEST
my ($arguments) = "CMD=Put&ENTREZ_QUERY=$orgn&CDD_SEARCH=off&FILTER=$filter&MATRIX_NAME=$matrix&PROGRAM=$program&DATABASE=$database&QUERY=" . $encoded_seq;
my ($req) = new HTTP::Request POST => 'http://blast.ncbi.nlm.nih.gov/Blast.cgi';
my ($req) = new HTTP::Request POST => 'https://blast.ncbi.nlm.nih.gov/Blast.cgi';
$req -> content_type('application/x-www-form-urlencoded');
$req -> content($arguments);
......@@ -468,7 +468,7 @@ sub WEB_BLAST {
}
$req = new HTTP::Request GET =>
"http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=$rid";
"https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=$rid";
$response = $ua->request($req);
if ( $response->content =~ /Status=WAITING/im ){
next;
......@@ -494,7 +494,7 @@ sub WEB_BLAST {
}
}
elsif ( $response->content =~ /can\'t connect/im ){
print {*STDERR} "\nCan't connect to blast.ncbi.nlm.nih.gov:80...new attempt";
print {*STDERR} "\nCan't connect to blast.ncbi.nlm.nih.gov... new attempt";
if ( $nb <3 ){
++$nb;
next;
......@@ -521,7 +521,7 @@ sub WEB_BLAST {
while (){
sleep 3;
$req = new HTTP::Request GET => "http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_TYPE=$format&FILTER=off&EXPECT=$Eval&ALIGNMENTS=$align&DESCRIPTIONS=$align&ALIGNMENT_VIEW=$aln_view&RID=$rid";
$req = new HTTP::Request GET => "https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_TYPE=$format&FILTER=off&EXPECT=$Eval&ALIGNMENTS=$align&DESCRIPTIONS=$align&ALIGNMENT_VIEW=$aln_view&RID=$rid";
$response = $ua -> request($req);
if ($response->content =~ /Altschul/i) { print "Search Complete\n"; push(@list_pdb,$response -> content);last; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment