]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/Dispatcher.pm
fix If-Modified-Since handling, thanks to weasel
[deb/packages.git] / lib / Packages / Dispatcher.pm
index 08c6f96a1c7cee40a1985e2a88eeb3006908f27f..105117f6ca6f0a382043ed10ea4ff943808bdbdf 100755 (executable)
@@ -101,8 +101,9 @@ sub do_dispatch {
     $last_modified = $now if $now - $last_modified < 3600;
 
     if ($input->http('If-Modified-Since') and
-       (my $modtime = str2time($input->http('If-Modified-Since'), 'UTC'))) {
-       if ($modtime <= $last_modified) {
+       (my $client_timestamp = str2time($input->http('If-Modified-Since'), 'UTC'))) {
+       if ($client_timestamp > $last_modified) {
+           # we are not modified since asked -> return "304 Not Modified"
            print $input->header(-status => 304);
            exit;
        }