From 284f3ff0a1669b8562785beae74e51012eeb04b0 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Mon, 22 Oct 2012 18:42:55 -0400 Subject: [PATCH] In XML-RPC Gateway, substitute __ for - in method names Dashes have never actually been valid in XML-RPC method names, and some clients (like newer versions of Perl's RPC::XML) enforce this rule on their clients. This way we give XML-RPC clients a way they can still reach our methods. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Jason Stephenson --- Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm index 42b69f62b9..9e4a4c1875 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm @@ -85,6 +85,11 @@ sub handler { sub run_request { my( $service, $method, @args ) = @_; + $method =~ s/__/-/g; # Our methods have dashes in them, but that's not + # actually a valid character in XML-RPC method + # names, and some clients enforce that restriction + # on their users. + # since multiple Perl clients run within mod_perl, # we must set our ingress before each request. OpenSRF::AppSession->ingress('xmlrpc'); -- 2.43.2