diff options
author | mneumann <mneumann@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-16 13:35:45 +0000 |
---|---|---|
committer | mneumann <mneumann@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-16 13:35:45 +0000 |
commit | 0a933d91fa562eddcc50e332e9742839f28b6a8f (patch) | |
tree | eefc9c8cee36d02dc926e6a54600be5c8d3fcfd8 | |
parent | fd5594a5c3cb2267ec26f6300178428f61a942d0 (diff) | |
download | ruby-0a933d91fa562eddcc50e332e9742839f28b6a8f.tar.gz ruby-0a933d91fa562eddcc50e332e9742839f28b6a8f.tar.xz ruby-0a933d91fa562eddcc50e332e9742839f28b6a8f.zip |
* fixed issue #998 (http://rubyforge.org/tracker/?func=detail&atid=1700&aid=998&group_id=426)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/xmlrpc/server.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/xmlrpc/server.rb b/lib/xmlrpc/server.rb index 0ef3ca4c9..f37f1084c 100644 --- a/lib/xmlrpc/server.rb +++ b/lib/xmlrpc/server.rb @@ -792,27 +792,27 @@ class WEBrickServlet < BasicServer def service(request, response) if request.request_method != "POST" - raise HTTPStatus::MethodNotAllowed, + raise WEBrick::HTTPStatus::MethodNotAllowed, "unsupported method `#{request.request_method}'." end if parse_content_type(request['Content-type']).first != "text/xml" - raise HTTPStatus::BadRequest + raise WEBrick::HTTPStatus::BadRequest end length = (request['Content-length'] || 0).to_i - raise HTTPStatus::LengthRequired unless length > 0 + raise WEBrick::HTTPStatus::LengthRequired unless length > 0 data = request.body if data.nil? or data.size != length - raise HTTPStatus::BadRequest + raise WEBrick::HTTPStatus::BadRequest end resp = process(data) if resp.nil? or resp.size <= 0 - raise HTTPStatus::InternalServerError + raise WEBrick::HTTPStatus::InternalServerError end response.status = 200 |