aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjake <jake@jakes-mail.top>2022-01-24 15:56:25 -0500
committerjake <jake@jakes-mail.top>2022-01-24 15:56:25 -0500
commit41d92d896455673a1fad4b3192b337f02f6d06f3 (patch)
treee17817f4ee25ce8ddba15a963530b9add854a732
parenta06378e0e14a18b977df3f99dcaee4f5d62b8d9d (diff)
bug fix with clear_query(), clear after server status 1x
-rwxr-xr-xgmi.pl7
1 files changed, 4 insertions, 3 deletions
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];
}