From 41d92d896455673a1fad4b3192b337f02f6d06f3 Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 24 Jan 2022 15:56:25 -0500 Subject: bug fix with clear_query(), clear after server status 1x --- gmi.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gmi.pl') diff --git a/gmi.pl b/gmi.pl index e9db282..7ef0ca9 100755 --- a/gmi.pl +++ b/gmi.pl @@ -10,7 +10,7 @@ use utf8; use feature qw(refaliasing); no warnings qw(experimental::refaliasing); -our $VERSION = 'v0.0.24'; +our $VERSION = 'v0.0.25'; # TODO: # back() only works once; should fix this @@ -276,6 +276,7 @@ sub follow_status_code { $input = uri_encode($input); ReadMode 1; url("$current_url?$input"); + clear_query(); } elsif ($status_code1 == 3) { print $bad_code if ($status_code2 !~ m/^0|1$/); # not worrying about permanent/temporary yet @@ -319,7 +320,7 @@ sub follow_status_code { } } else { - print $OUT "The server is asking us to slow down and try again after $status_code[1] seconds.\n" . + print $OUT "The server is asking us to slow down and try again.\n" . "We have already done this once: not doing it again.\n"; } undef($sleep); @@ -758,5 +759,5 @@ sub value_number { sub clear_query { return 1 if (!$current_url); my @url = split('\?', $current_url); - $current_url = $url[1]; + $current_url = $url[0]; } -- cgit v1.2.3