[jdev] Server suddenly closing <stream:stream> on <presence><status/></presence>. Why?
Peter Saint-Andre
stpeter at stpeter.im
Thu Jan 17 21:04:08 CST 2008
Sean Gilbertson wrote:
> Hi all,
>
> Thank you for your responses and suggestions.
>
> I have some more information on this issue: I took out all the code
> that retrieves the contact list and sets the status (which would
> trigger availability information), and the server still closes the
> connection gracefully (i.e. by sending </stream:stream>). I even took
> out the library I was using to handle parsing the XML; I just read it
> in (in a buffered fashion), and spit it out. So, it seems as though -
> on my phone at least (not in debug mode on my computer!) - as soon as
> I finish sending stanzas one after another, the server closes the
> connection. What's up with that?
>
> Oh, and the server is Google Talk. I'm using SSL.
Maybe download one of the open-source servers and test things out
locally before you try to run your software against a live service such
as Google Talk? Also, Google Talk has some quirks. You might want to
test things with, say, the jabber.org service first.
> Here's what the server sends to me:
>
> <stream:stream from="gmail.com" id="2823903EEAA22D0D"
> xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
> <iq type="result">
> <query xmlns="jabber:iq:auth">
> <username/>
> <resource/>
> <password/>
> </query>
> </iq>
> <iq type="result"/>
> </stream:stream>
What did you send before you received that?
It seems to me that perhaps you sent this:
<stream:stream
to="gmail.com"
xmlns:stream="http://etherx.jabber.org/streams"
xmlns="jabber:client">
<iq type="get">
<query xmlns="jabber:iq:auth"/>
</iq>
The server may not be happy that you tried to send the <iq/> before you
received the response stream header.
Peter
--
Peter Saint-Andre
https://stpeter.im/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://www.jabber.org/jdev/attachments/20080117/fbab9608/attachment-0002.bin>
More information about the JDev
mailing list