projects
/
plack-app-gruntmaster.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1f7dac
)
Use 303 instead of 205 in /login
author
Marius Gavrilescu
<marius@ieval.ro>
Tue, 20 Jan 2015 12:27:34 +0000
(14:27 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Tue, 20 Jan 2015 12:27:34 +0000
(14:27 +0200)
lib/Plack/App/Gruntmaster.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Plack/App/Gruntmaster.pm
b/lib/Plack/App/Gruntmaster.pm
index bfddd26a8478df7225910dc663fd66f815d66f74..9775b960c10d729d96c7984f5661dcf8f6e99073 100644
(file)
--- 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}" },
This page took
0.00997 seconds
and
4
git commands to generate.