After i have successfully authenticated myself i try to go offline by sending the following stanza :
<body rid='1847712198'
xmlns='http://jabber.org/protocol/httpbind'>
<presence type='unavailable'
from='user40122310029739@website.com/site-chat'
xmlns='jabber:client' />
</body>
This returns the following stanza :
<body type='terminate'
condition='improper-addressing'
xmlns='http://jabber.org/protocol/httpbind' />
The error log shows :
=INFO REPORT==== 2010-06-10 19:37:55 ===
D(<0.3235.7>:ejabberd_http_bind:1083) : --- incoming data ---
<body rid='1847712198'
xmlns='http://jabber.org/protocol/httpbind'>
<presence type='unavailable'
from='user40122310029739@godudu.com/site-chat'
xmlns='jabber:client' />
</body>
--- END ---
=ERROR REPORT==== 2010-06-10 19:37:55 ===
E(<0.3235.7>:ejabberd_http_bind:180) : Session not created (Improper addressing)
The user remains logged into the server until the connection times out. What is the problem?
PS : I am using Ejabberd 2.1.3 on ErlangR12B, Linux
Notice that
Notice thathttp://xmpp.org/extensions/xep-0124.html#terminate says:
You didn't include the type="terminate".
I logged in with an HTTPBind client to ejabberd 2.1.4. When I select in the client "Disconnect from the server", that client sends to ejabberd:
<body rid='857095'
sid='a4e7afe609f76c80aa8ce2c214690dfe5f91d93f'
xmlns='http://jabber.org/protocol/httpbind'
key='64985e03b0fe7333653084c084c6cefb4c27069d'
type='terminate' />
Then ejabberd sends two stanzas to the client:
<body xmlns='http://jabber.org/protocol/httpbind' />
<body type='terminate'
xmlns='http://jabber.org/protocol/httpbind' />
And finally ejabberd.log shows:
=INFO REPORT==== 12-Jun-2010::13:48:12 ===
I(<0.420.0>:ejabberd_c2s:1409) : ({socket_state,ejabberd_http_bind,{http_bind,<0.419.0>,{{127,0,0,1},41926}},ejabberd_http_bind}) Close session for badlop@localhost/OneTeam