Comparison

plugins/mod_xmlrpc.lua @ 1640:726ac98306d8

mod_xmlrpc: Correct stripping of filename/line number prefix in RPC method error results
author Matthew Wild <mwild1@gmail.com>
date Wed, 05 Aug 2009 20:00:07 +0100
parent 1591:aaa1bcb7af98
child 2923:b7049746bd29
comparison
equal deleted inserted replaced
1639:0914d128c55e 1640:726ac98306d8
81 if success then 81 if success then
82 return result; 82 return result;
83 end 83 end
84 return create_error_response(500, "Error in creating response: "..result); 84 return create_error_response(500, "Error in creating response: "..result);
85 end 85 end
86 return create_error_response(0, (result and result:gmatch("[^:]*:[^:]*: (.*)")()) or "nil"); 86 return create_error_response(0, tostring(result):gsub("^[^:]+:%d+: ", ""));
87 end 87 end
88 88
89 local function handle_xmpp_request(origin, stanza) 89 local function handle_xmpp_request(origin, stanza)
90 local query = stanza.tags[1]; 90 local query = stanza.tags[1];
91 if query.name == "query" then 91 if query.name == "query" then