X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=3a7b9db121302ed83d9dcba510193693050324cb;hb=a8dc218ceb178e05b574deed4090503fa9be3502;hp=ef80f50eb8fa58c36d6f37691a15504ec7d380b1;hpb=b7c79e04cb3c8ea826ea1aac8049333564794536;p=gruntmaster-page.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index ef80f50..3a7b9db 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -116,7 +116,6 @@ sub dispatch_request{ }, sub (/robots.txt) { NOT_FOUND }, - sub (/favicon.ico) { NOT_FOUND }, sub (/src/:job) { return NOT_FOUND if !job; @@ -124,7 +123,7 @@ sub dispatch_request{ my $private = job->private || job->problem->private || job->contest && job->contest->is_running; forbid !$isowner && $private; my $privacy = $private ? 'private' : 'public'; - my @headers = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=604800", 'Content-Type' => CONTENT_TYPES->{job->format}); + my @headers = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=604800", 'Content-Type' => CONTENT_TYPES->{job->extension}); push @headers, (Vary => 'Authorization') if $private; [200, \@headers, [job->source]] }, @@ -165,7 +164,7 @@ sub dispatch_request{ }, sub (/ed/:contest) { - forbid contest->is_running; + forbid !contest->is_finished; my $pblist = db->problem_list(contest => $_{contest}, solution => 1); response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial}; },