pas => 'text/x-pascal',
pl => 'text/x-perl',
py => 'text/x-python',
+ rb => 'application/x-ruby',
l => 'text/plain',
};
PASCAL => 'pas',
PERL => 'pl',
PYTHON => 'py',
+ RUBY => 'rb',
SBCL => 'l',
};
sub (/login) {
forbid !remote_user;
-
- my $return = $env->{HTTP_REFERER} // '/';
- [303, ['Set-Cookie' => "username=".remote_user->id, Location => $return], []]
+ [200, ['Content-Type' => 'text/plain; charset=UTF-8', 'Cache-Control' => 'private, max-age=300', Vary => 'Authorization'], [$env->{REMOTE_USER}]]
},
sub (/ct/:contest/log/st) { redirect "/st/$_{contest}" },
},
sub (/pb/ + ?:owner~&:contest~&:private~) {
forbid $_{private};
- forbid contest->is_pending;
+ forbid contest && contest->is_pending;
response pb => 'Problems', db->problem_list(%_)
},