提交 b14e5d83 编写于 作者: L Leon Breedt

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
上级 594063f2
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册