diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-18 14:15:26 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-18 14:15:26 +0000 |
commit | e9681eb9c5bd29f555d56bb9842f1d561334a21e (patch) | |
tree | 8d1900e0a8e0e0c9491d540e7f255ead8b2addd6 /railties | |
parent | a37b8b33d4d5da6a671205551bf4473cea2a4692 (diff) | |
download | rails-e9681eb9c5bd29f555d56bb9842f1d561334a21e.tar.gz rails-e9681eb9c5bd29f555d56bb9842f1d561334a21e.tar.bz2 rails-e9681eb9c5bd29f555d56bb9842f1d561334a21e.zip |
Added graceful handling of PUT, DELETE, and OPTIONS requests for a complete coverage of REST functionality #1136 [joshknowles@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/webrick_server.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 43acffab86..dee7713a6b 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -28,7 +28,7 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet super end - def do_GET(req, res) + def service(req, res) begin unless handle_file(req, res) REQUEST_MUTEX.lock @@ -41,12 +41,10 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet end end - alias :do_POST :do_GET - def handle_file(req, res) begin add_dot_html(req) - @file_handler.send(:do_GET, req, res) + @file_handler.send(:service, req, res) remove_dot_html(req) return true rescue HTTPStatus::PartialContent, HTTPStatus::NotModified => err |