From: Marius Gavrilescu Date: Fri, 20 Feb 2015 12:08:30 +0000 (+0200) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=c99c1530347a64a134c74659f10b9c1cd632b42f;hp=-c;p=plack-app-gruntmaster.git Merge branch 'master' into newmc --- c99c1530347a64a134c74659f10b9c1cd632b42f diff --combined lib/Plack/App/Gruntmaster.pm index e0f921d,edf1911..288f18c --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@@ -53,7 -53,7 +53,7 @@@ use constant FORMAT_EXTENSION => SBCL => 'l', }; - use constant NOT_FOUND => [404, ['Content-Type' => 'text/plain'], ['Not found']]; + use constant NOT_FOUND => [404, ['X-Forever' => 1, 'Content-Type' => 'text/plain'], ['Not found']]; use constant FORBIDDEN => [401, ['Content-Type' => 'text/plain', 'WWW-Authenticate' => 'Basic realm="Gruntmaster 6000"'], ['Forbidden']]; sub development() { ($ENV{PLACK_ENV} // 'development') eq 'development' } @@@ -115,6 -115,9 +115,9 @@@ sub dispatch_request [200, \@headers, [development ? $js : JavaScript::Minifier::XS::minify $js]] }, + sub (/robots.txt) { NOT_FOUND }, + sub (/favicon.ico) { NOT_FOUND }, + sub (/src/:job) { return NOT_FOUND if !job; my $isowner = remote_user && remote_user->id eq job->rawowner; @@@ -163,8 -166,7 +166,8 @@@ sub (/ed/:contest) { forbid contest->is_running; - response ed => 'Editorial of ' . contest->name, db->problem_list(contest => $_{contest}, solution => 1); + my $pblist = db->problem_list(contest => $_{contest}, solution => 1); + response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial}; }, sub (/login) {