[s-xml-rpc-devel] bug: S-XML-RPC sends unencoded strings with invalid characters
Taylor R Campbell
campbell at mumble.net
Fri Jul 28 18:59:15 UTC 2006
Date: Fri, 28 Jul 2006 20:49:26 +0200
From: Sven Van Caekenberghe <scaekenberghe at common-lisp.net>
Where exactly in the XML-RPC spec does it say this ? I never saw
something like that.
From my point of view, the XML-RPC spec is softer and more down to
earth than others.
This is both a strong as well as a weak point. I also find their use
of XML as being simplified as well.
It's not the XML-RPC specification that mandates this; it is simply
what must be done to accomodate clauses in the XML specification.
That is, <value><string>&#C;</string></value> is malformed XML, while
<value><base64>DA==</base64></value> is well-formed, and since XML-RPC
is encoded in XML, the only way to encode the value of the Lisp code
(STRING (CODE-CHAR #X0C)) in XML-RPC is to use base64.
If what you say is correct (and it looks that way), then I like XML
even less than before ;-)
This would make any serialization of string overly complex, for any
language or encoding.
Applying this change would kill some of my code is border cases.
Maybe we could add something like a 'strict' flag to toggle the
behavior you suggest.
I'm no big fan of XML myself, but the XML specification is very
specific about this, and it's much more stringent than its
predecessors about these details. Much as I dislike XML, I think that
it is at least important to try to comply with it, or at least to
follow the universal internet guideline of being lenient in what is
accepted and conservative in what is produced. (I had to fix MIT
Scheme's XML-RPC support, by the way -- it, too, was failing to encode
strings properly, although its XML parser refused the  from
lisppaste.)
More information about the S-xml-rpc-devel
mailing list