[ejabberd] Error: REST request is rejected by service

James Tait james.tait at wyrddreams.org
Fri Jul 22 16:11:11 MSK 2016

On 22/07/16 06:52, David Cunningham wrote:

> Hi,
> I'm trying to push presence updates to XMPP clients, and have been
> working with mod_rest. When an HTTP request is sent it gets an error
> "REST request is rejected by service". I'm sure the client IP is
> allowed in the mod_rest configuration so what could be wrong? Thanks
> in advance.
> BTW, if another method instead of mod_rest is recommended I'd be
> interested to hear it.
> Using ngrep:
> T XX.XX.246.78:42797 -> XX.XX.246.78:5285 [AP]
>   POST /rest HTTP/1.1..TE: deflate,gzip;q=0.3..Connection: TE,
> close..Host: foo.com:5285..User-Agent: foo 1.0..Content-Length:
> 132..Content-Type: application/x-www-form-urlencoded....<presence
> to="david at foo.com <mailto:david at foo.com>" from="other at foo.com
> <mailto:other at foo.com>"><status>On the phone</status></presence>       
> ##
> T XX.XX.246.78:5285 -> XX.XX.246.78:42797 [AP]
>   HTTP/1.1 406 Not Acceptable..Content-Type: text/html;
> charset=utf-8..Content-Length: 43....Error: REST request is rejected
> by service.                                     

The HTTP response code suggests that the client is not capable of
accepting the server’s response. Is your client perhaps sending an
Accept header such as |Accept: text/plain| where ejabberd is expecting
to send a response of content-type |application/xml|?



James Tait, BSc                        |    xmpp:jayteeuk at wyrddreams.org
Programmer and Free Software advocate  |        Tel: +44 (0)870 490 2407

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20160722/db34298c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20160722/db34298c/attachment.sig>

More information about the ejabberd mailing list