[ejabberd] mod_rest does not return process_rosteritems results

Badlop badlop at gmail.com
Mon Nov 19 22:32:05 MSK 2012

The problem is not in mod_rest; it shows whatever response it receives.

The problem is in the command process_rosteritems: it returns as
reponse a simple code. What you see in the shell when running it with
ejabberdctl is a side effect (a print to console). That command was
implemented when only ejabberdctl was available (no mod_rest or
ejabberd_xmlrpc), so I didn't care to provide the result as a
response, and simply prefered to print it as a side effect in the
console, which is the easiest to implement.

I've updated it in SVN, now it retuns the list of pairs of JIDs also
as response.


$ wget http://localhost:5280/rest/ --server-response --post-data
'process_rosteritems list any any any any'
--2012-11-19 19:26:17--  http://localhost:5280/rest/
Resolviendo localhost (localhost)...
Conectando con localhost (localhost)[]:5280... conectado.
Petición HTTP enviada, esperando respuesta...
  HTTP/1.1 200 OK
  Content-Type: text/html; charset=utf-8
  Content-Length: 170
Longitud: 170 [text/html]
Grabando a: “index.html”

170         --.-K/s   en 0s

2012-11-19 19:26:19 (8,96 MB/s) - “index.html” guardado [170/170]

$ cat index.html
badlop at localhost        badlop2 at localhost
user2 at localhost user1 at localhost
badlop2 at localhost       badlop at localhost
badlop at localhost        contacto1 at localhost
user1 at localhost user2 at localhost


More information about the ejabberd mailing list