diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-03-28 06:55:30 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-03-28 06:55:30 +0000 |
commit | b14e5d8334ac5c46d69c1eee4fcb2f3a73da3e6a (patch) | |
tree | 3ddd288526059412b30758678799b199f57ed1cb /actionwebservice/lib | |
parent | 594063f23cf8e7cecd24329e801992784f420b55 (diff) | |
download | rails-b14e5d8334ac5c46d69c1eee4fcb2f3a73da3e6a.tar.gz rails-b14e5d8334ac5c46d69c1eee4fcb2f3a73da3e6a.tar.bz2 rails-b14e5d8334ac5c46d69c1eee4fcb2f3a73da3e6a.zip |
don't hide exceptions when we fail to parse XML-RPC messages.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib')
-rw-r--r-- | actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb | 9 | ||||
-rw-r--r-- | actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb index 5289b0b84d..8a2b1d1c7d 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb @@ -38,7 +38,12 @@ module ActionWebService # :nodoc: module InstanceMethods # :nodoc: private def dispatch_web_service_request - request = discover_web_service_request(@request) + exception = nil + begin + request = discover_web_service_request(@request) + rescue Exception => e + exception = e + end if request log_request(request, @request.raw_post) response = nil @@ -57,7 +62,7 @@ module ActionWebService # :nodoc: send_web_service_response(response, bm.real) end else - exception = DispatcherError.new("Malformed SOAP or XML-RPC protocol message") + exception ||= DispatcherError.new("Malformed SOAP or XML-RPC protocol message") send_web_service_error_response(request, exception) end rescue Exception => e diff --git a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb index f3e4a23b4b..37ef16c12f 100644 --- a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +++ b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb @@ -16,8 +16,6 @@ module ActionWebService # :nodoc: params = params.map{|x| @marshaler.unmarshal(x)} service_name = ap_request.parameters['action'] Request.new(self, method_name, params, service_name) - rescue - nil end def protocol_client(api, protocol_name, endpoint_uri, options) |