From: Marius Gavrilescu Date: Tue, 20 Jan 2015 12:27:34 +0000 (+0200) Subject: Use 303 instead of 205 in /login X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=4f3b70b7d2366e68014ca2eec7d4c051f3418031;p=plack-app-gruntmaster.git Use 303 instead of 205 in /login --- diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index bfddd26..9775b96 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -151,7 +151,8 @@ sub dispatch_request{ sub (/login) { forbid !remote_user; - [205, ['Set-Cookie' => "username=".remote_user->id], []] + my $return = $env->{HTTP_REFERER} // '/'; + [303, ['Set-Cookie' => "username=".remote_user->id, Location => $return], []] }, sub (/ct/:contest/log/st) { redirect "/st/$_{contest}" },