nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27988ad
)
popcorn: redirect uses 303 by default
author
Jean Privat
<jean@pryen.org>
Fri, 19 Aug 2016 13:58:16 +0000
(09:58 -0400)
committer
Jean Privat
<jean@pryen.org>
Fri, 19 Aug 2016 19:09:48 +0000
(15:09 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/popcorn/pop_handlers.nit
patch
|
blob
|
history
diff --git
a/lib/popcorn/pop_handlers.nit
b/lib/popcorn/pop_handlers.nit
index
1a22db6
..
e4da4a5
100644
(file)
--- a/
lib/popcorn/pop_handlers.nit
+++ b/
lib/popcorn/pop_handlers.nit
@@
-464,12
+464,15
@@
redef class HttpResponse
end
# Redirect response to `location`
+ #
+ # Use by default 303 See Other as it is the RFC
+ # way to redirect web applications to a new URI.
fun redirect(location: String, status: nullable Int) do
header["Location"] = location
if status != null then
status_code = status
else
- status_code = 302
+ status_code = 303
end
check_sent
sent = true