aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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];
}