From 4f3b70b7d2366e68014ca2eec7d4c051f3418031 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 20 Jan 2015 14:27:34 +0200 Subject: [PATCH] Use 303 instead of 205 in /login --- lib/Plack/App/Gruntmaster.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}" }, -- 2.39.2