dap/XML-Stream — pull request #11 by dmansfield (2013-07-30 20:23:48+00:00)
Title: Fix for two issues preventing interoperability with openfire

First issue:

For some reason, openfire often produces on-the-wire writes which consist of two separate "chunks". The first chunk is "<" and the second is the rest of the XML element.

This is handled just fine except that the code in the Parser.pm was misdetecting the XML "prolog" (e.g. "") if the first three characters were not received in one "chunk". Fix this.

Second issue:

(This also requires changes in Net-XMPP which are submitted in a pull request on that project)

When SSL handshake failed, e.g. because of invalid certificates, the error was not being trapped and the code continued as if everything was fine. Now it fails correctly and grabs the error code from the IO::Socket::SSL library and makes it available for consumers.