1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

cookie sessions

This commit is contained in:
blake.mizerany@gmail.com 2007-09-25 00:40:18 +00:00
parent fdd44669bc
commit c85078476a
2 changed files with 5 additions and 1 deletions

View file

@ -84,6 +84,10 @@ module Sinatra
end
alias :header :headers
def session
request.env['rack.session']
end
def params
@params ||= @request.params.symbolize_keys
end

View file

@ -10,7 +10,7 @@ module Sinatra
def start
begin
tail_thread = tail(Options.log_file)
Rack::Handler::Mongrel.run(Dispatcher.new, :Port => Options.port) do |server|
Rack::Handler::Mongrel.run(Rack::Session::Cookie.new(Dispatcher.new), :Port => Options.port) do |server|
puts "== Sinatra has taken the stage on port #{server.port}!"
trap("INT") do
server.stop