fo0bar (fo0bar) wrote in lj_dev,
fo0bar
fo0bar
lj_dev

While trying to connect to LiveJournal chat using perl Net::XMPP, XML::Stream hangs after trying to parse the <stream:features> tag on the same line as the <stream:stream> tag:
XML::Stream: Read: buff(<?xml version="1.0" encoding="UTF-8"?><stream:stream from='livejournal.com' id="3bbf94008249c512eb7a5019362fd5f7610afe29" version='1.0' xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"><stream:features><auth xmlns='http://jabber.org/features/iq-auth'/></stream:features>)

While this is really an XML::Stream bug, it could be mitigated by sending <stream:features> and <stream:stream> as separate response packets. This is how both jabberd2 and gmail do things.
XML::Stream: Read: buff(<?xml version="1.0" encoding="UTF-8"?><stream:stream from="gmail.com" id="23CABD647D9A4653" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">)
XML::Stream: Read: buff(<stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>)

Any chance this could get changed on the LJ server side?
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments