Skip to content
Browse files

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
  • Loading branch information...
1 parent 594063f commit b14e5d8334ac5c46d69c1eee4fcb2f3a73da3e6a @bitserf bitserf committed
View
9 actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb
@@ -38,7 +38,12 @@ def inherited(child)
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 @@ def dispatch_web_service_request
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
View
2 actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
@@ -16,8 +16,6 @@ def unmarshal_request(ap_request)
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)

0 comments on commit b14e5d8

Please sign in to comment.
Something went wrong with that request. Please try again.