Minor fixes

1) WEBrick should respond to TERM signals
(needed by MacOSX and, perhaps, others).
2) HTTP redirects for redirected pages should be 301's.
3) Add a flash message for redirection to "new" page
when the target of "show" action is not found.
This commit is contained in:
Jacques Distler 2009-06-14 22:55:41 -05:00
parent d50d6fac17
commit 7448b7981b
2 changed files with 5 additions and 2 deletions

View file

@ -9,6 +9,7 @@ module Rack
server = ::WEBrick::HTTPServer.new(options)
server.mount "/", Rack::Handler::WEBrick, app
trap(:INT) { server.shutdown }
trap(:TERM) { server.shutdown }
yield server if block_given?
server.start
end