R: [phpxmlrpc-devel] BUG in release 1.0.99!!!
Brought to you by:
ggiunta
From: Gaetano G. <giu...@se...> - 2003-01-03 17:19:56
|
I noticed your patch on sf as soon as I finished posting my mail, DOH. Thanks for the clear explanation. I was thinking about a way to 'throw errors' if the XML-RPC param values = do not match the declared data type. Right now this is checked for INT = values, but not for other data types (IIRC the spec), which lacks a bit = in coherence: why shuld the server tell the client he's calling an = unsupported method if the function call gets wrong the number/type of = parameters and not if it passes unlawful parameter values?. What I had in mind is allowing the coder to decide how to respond to = malformed data, by e.g. providing an error handling function of the = xmlrpcserver class (that could be overriden if needed by the library = user). Or a property of the xmlrpcserver/client class could decide = wheter to enforce strict type checking or not. The $_xh[$parser]['isf'] variable looks like an appropriate place to = store the information on 'bad param data in xml', but the handling of = errors would have to be done in xmlrpcmsg->parseresponse and = xmlrpcserver->parserequest (an involved change). Any thoughts/comments? regards Gaetano > Gaetano Giunta wrote: > > xmlrpc->faultcode() returns -1 on a succesful function call!!! > >=20 > > This is in contrast with the manual and with previous behaviour. > >=20 >=20 > probably you're talking about my "feature". > in some situations( when mehtod throws error, but=20 > faultcode=3D=3D0, in example client(phpxmlrpc)=3D>server(java=20 > xmlrpc.apache.org)) php client thinks there is no error.=20 > (because faultcode() test returns 0). so i made patch which=20 > fixes it, and returns fault -1 (which is properly recognized=20 > by client). >=20 > this patch was applied to cvs. >=20 > but i realized that i made mistake in that (in some versions=20 > of php doesn't work). i fixed it immediately and posted next=20 > patch, but for unknown reasons this wasn't imcluded to cvs. >=20 > so i posted it to > https://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D6190 > 08&group_id=3D34455&atid=3D411302 >=20 > hope it helps >=20 > regards >=20 > maHo >=20 >=20 |