18: def process(request, response)
19:
20: response['Content-Type'] = 'text/plain'
21: if not request.post? then
22: response.status = 405
23: response.write 'Method Not Allowed'
24: return
25: end
26: if request.media_type() != "text/xml" then
27: response.status = 400
28: response.write 'Bad Request'
29: return
30: end
31:
32:
33: client_request = build_client_request(request)
34:
35: response_body = @xmlrpc_server.process(request.body.read(), client_request)
36:
37: response.status = 200
38: response['Content-Type'] = 'text/xml; charset=utf-8'
39: response.write response_body
40: end