Changeset

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
parents 1639:0914d128c55e
children 1642:8ba5752851dc
files plugins/mod_xmlrpc.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_xmlrpc.lua	Wed Aug 05 16:37:28 2009 +0100
+++ b/plugins/mod_xmlrpc.lua	Wed Aug 05 20:00:07 2009 +0100
@@ -83,7 +83,7 @@
 		end
 		return create_error_response(500, "Error in creating response: "..result);
 	end
-	return create_error_response(0, (result and result:gmatch("[^:]*:[^:]*: (.*)")()) or "nil");
+	return create_error_response(0, tostring(result):gsub("^[^:]+:%d+: ", ""));
 end
 
 local function handle_xmpp_request(origin, stanza)