]> iEval git - plack-app-gruntmaster.git/blobdiff - lib/Plack/App/Gruntmaster.pm
Use 303 instead of 205 in /login
[plack-app-gruntmaster.git] / lib / Plack / App / Gruntmaster.pm
index 8aab08c2c7e261f50418d9f5454d44fb25baa1a6..9775b960c10d729d96c7984f5661dcf8f6e99073 100644 (file)
@@ -151,7 +151,8 @@ sub dispatch_request{
                sub (/login) {
                        forbid !remote_user;
 
-                       [204, ['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}" },
This page took 0.022658 seconds and 4 git commands to generate.