[jdev] Server closes stream?

Tim Heinrich thecurse at gmx.com
Tue Feb 6 08:25:29 CST 2007


Ok, I think I found it. I am using an C# XmlTextWriter to write to the
stream. Somehow it seems to close open XML Tags on a flush...

Am Dienstag, den 06.02.2007, 13:51 +0000 schrieb Artur Hefczyc:
> This is not correct indeed unless server wants intentionally close the
> connection for some reason.
> Maybe you "accidentaly" sent </stream:stream> from your library?
> 
> What server do you use by the way?
> 
> Artur
> 
> On Tuesday 06 February 2007 13:40, Tim Heinrich wrote:
> > Hi,
> >
> > I tried to write a little library to connect to a jabber server, so I
> > started implementing rfc3920. After sending the initial
> >
> > C: <?xml version='1.0'?>
> >    <stream:stream
> >        to='example.com'
> >        xmlns='jabber:client'
> >        xmlns:stream='http://etherx.jabber.org/streams'
> >        version='1.0'>
> >
> > the server responds with something like this:
> >
> > S: <?xml version='1.0'?>
> >    <stream:stream
> >        from='example.com'
> >        id='someid'
> >        xmlns='jabber:client'
> >        xmlns:stream='http://etherx.jabber.org/streams'
> >        version='1.0'>
> > <stream:features>
> > <register xmlns='http://jabber.org/features/iq-register'/>
> > <auth xmlns='http://jabber.org/features/iq-auth'/>
> >   <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
> >   <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
> > <mechanism>NTLM</mechanism>
> > <mechanism>DIGEST-MD5</mechanism>
> > <mechanism>CRAM-MD5</mechanism>
> >   </mechanisms>
> > </stream:features>
> >
> > Ok so far, but now it sends a
> >
> > </stream:stream>
> >
> > That is not ok, is it? Refering to rfc3920 it should not send a
> > </stream:stream> I think. Even if I send the
> >
> > <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
> >
> > now—as described in rfc3920—the server does not respond. What is wrong
> > here?
> >
> > Bye,
> > Tim
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3409 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20070206/74e176b6/attachment-0002.bin>


More information about the JDev mailing list