import console
import realtime
-# Initialize session in request if non existent.
-#
-# Should be called before any use of the session.
-class SessionInit
- super Handler
-
- redef fun all(req, res) do if req.session == null then req.session = new Session
-end
-
# Initialize a clock for the resquest.
#
# Can be used to compute the time passed to respond that request.
redef fun all(req, res) do
var clock = req.clock
if clock != null then
- log "{req.method} {req.uri} {status(res)} ({clock.total}s)"
+ log "{req.method} {req.url} {status(res)} ({clock.total}s)"
else
- log "{req.method} {req.uri} {status(res)}"
+ log "{req.method} {req.url} {status(res)}"
end
end