X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=80bcc1a9c130563aacdce3ac9b72aaade7d33d6b;hb=f2d78743a891311cf02a3a80a60c8a1ddc72b98e;hp=2bacc0a05a537d2d0202be8642ac824cea05970a;hpb=af74ccc4bb368985516d7d13ab854c67b562ef79;p=plack-app-gruntmaster.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 2bacc0a..80bcc1a 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -124,7 +124,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]] }, @@ -227,7 +227,6 @@ sub dispatch_request{ db->users->create({id => $_{username}, name => $_{name}, email => $_{email}, phone => $_{phone}, town => $_{town}, university => $_{university}, country => $_{country}, level => $_{level}}); db->user($_{username})->set_passphrase($_{password}); - purge '/us/'; reply 'Registered successfully'; }, @@ -264,7 +263,6 @@ sub dispatch_request{ owner => remote_user->id, }); - purge '/log/'; [303, [Location => '/log/' . $newjob->id], []] },