X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=6685008d9a98eba693b6eceb7718521c20628123;hp=a6a8de4b52f82cd9db3138a8dc1fadea065d05e1;hb=fd38bb6363334ccb1ed756ace442b59c5bdf6bd1;hpb=9b0484cc963ef4d7056d644b418ba03cce579bca diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index a6a8de4..6685008 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -32,7 +32,7 @@ BEGIN { require Sesse::pr0n::Config_local; }; - $VERSION = "v3.00"; + $VERSION = "v3.01"; @ISA = qw(Exporter); @EXPORT = qw(&error &dberror); %EXPORT_TAGS = qw(); @@ -128,7 +128,8 @@ sub get_query_string { my $first = 1; my $str = ""; - while (my ($key, $value) = each %$param) { + for my $key (sort keys %$param) { + my $value = $param->{$key}; next unless defined($value); next if (defined($defparam->{$key}) && $value == $defparam->{$key}); @@ -602,7 +603,6 @@ sub ensure_cached { $img = read_original_image($r, $filename, $id, $dbwidth, $dbheight, 0); $new_dbwidth = $width = $img->Get('columns'); $new_dbheight = $height = $img->Get('rows'); - @$img = (); } else { $img = Image::Magick->new; $width = $dbwidth; @@ -1006,7 +1006,7 @@ sub set_last_modified { my ($res, $mtime) = @_; my $str = POSIX::strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime($mtime)); - $res->headers({ 'Last-Modified' => $str }); + $res->header('Last-Modified' => $str); } sub get_server_name {