[JDEV] IQ queries sent to client vs. handled by server?

Jens Alfke jens at mac.com
Thu Aug 2 00:22:41 CDT 2001


On Wednesday, August 1, 2001, at 07:56 PM, Thomas Charron wrote:

>   DoH!  I stand corrected.  The server has this currently implemented 
> as a
> server module ALREADY as mod_xml.  The applicable cose is located at
> http://download.jabber.org/cvs/jabber2/jsm/modules/mod_xml.c
>   Basically, do a set on ANY *NON* jabber:* namespace, and it will 
> store it.

I skimmed through the code; I'm totally unfamiliar with the server 
implementation but I got the gist of it. It definitely seems that the 
mod_xml_get function, which handles the "get" requests, intercepts ALL 
non-"jabber:" namespaces and ALWAYS returns the stored XML (or an empty 
result if nothing is stored). In other words, live client-to-client 
"get" requests are effectively impossible, since the server will eat 
them all. The only way around this is to make up a new namespace in the 
"jabber:" domain, which is of course a Bad Idea.

So isn't this kind of a monkey wrench in the whole Jabber extensibility 
story? The functionality of IQ queries has been greatly reduced by 
this -- now, to define a new query type you have to hack the server to 
get around mod_xml, otherwise the clients won't be able to talk to each 
other.

mod_xml looks like a really poorly thought-out idea. It would have been 
great had it reserved some particular namespace and only handled queries 
in children of that, but by eating the entire namespace universe apart 
from "jabber:", it leaves no room for anything else.

(Or have I managed to completely misunderstand those few pages of C 
code?)

--Jens




More information about the JDev mailing list