Use 303 instead of 205 in /login
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 20 Jan 2015 12:27:34 +0000 (14:27 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 20 Jan 2015 12:27:34 +0000 (14:27 +0200)
lib/Plack/App/Gruntmaster.pm

index bfddd26a8478df7225910dc663fd66f815d66f74..9775b960c10d729d96c7984f5661dcf8f6e99073 100644 (file)
@@ -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}" },
This page took 0.00997 seconds and 4 git commands to generate.