From maciekp at japhy.fnord.org Sun Aug 27 19:45:52 2006
From: maciekp at japhy.fnord.org (Maciek Pasternacki)
Date: Sun, 27 Aug 2006 21:45:52 +0200
Subject: [s-xml-rpc-devel] Patch
Message-ID: <87sljim07j.fsf@lizard.king>
Hello.
I started to look at s-xml-rpc library today and to communicate with
Python client. Python's default xmlrpclib sends no-argument methods
like this (from debug log):
,----
|
|
| system.listMethods
|
|
| 12 received call ("system.listMethods" . "
| ")
`----
Library throws error from #'APPLY because last argument is a string,
not a list. A simple patch that makes it work:
#v+ diff -u xml-rpc{-orig,}.lisp
--- xml-rpc-orig.lisp 2006-08-27 21:43:19.000000000 +0200
+++ xml-rpc.lisp 2006-08-27 21:43:25.000000000 +0200
@@ -494,6 +494,8 @@
;; -32603 ---> server error. internal xml-rpc error
(encode-xml-rpc-fault (format nil "~a" c) -32603)))))
(let ((call (decode-xml-rpc (debug-stream in))))
+ (unless (listp (rest call))
+ (setf (rest call) nil))
(format-debug (or *xml-rpc-debug-stream* t) "~a received call ~s~%" id call)
(let ((result (apply *xml-rpc-call-hook*
(first call)
#v-
--
__ Maciek Pasternacki [ http://japhy.fnord.org/ ]
`| _ |_\ / { Ibi nullus timet mortem
,|{-}|}| }\/ sed pro Baccho mittunt sortem. }
\/ |____/ ( Carmina Burana ) -><-