[jdev] parsing xml (xmpp) with ruby
Michal 'vorner' Vaner
vorner at ucw.cz
Mon Sep 29 02:02:23 CDT 2008
Hello
On Sun, Sep 28, 2008 at 11:42:56PM -0700, Justin Karneges wrote:
> On Sunday 28 September 2008 21:52:49 jlist wrote:
> 2) Don't send TLS bytes into your SAX parser. When you receive
> <proceed/>[binary data], then you want to make sure that [binary data] isn't
> SAX-parsed. Unless your parser allows you to peek at unprocessed data, the
> purest solution is to feed one byte at a time to the parser so that you can
> manage an "unprocessed" data buffer yourself.
I tried to create my own XMPP parser/library (for, ehm, educational
purposes). I never come across this issue. As far as I understand it, I
get proceed, but no more binary data. I send binary data first (I
initiate the SSL handshake), more come as a response and I can be ready
then.
So, when I receive proceed, take a stock standard SSL/TLS library, put it
between the socket and new instance of the parser, everything works all
by itself and the parser starts receiving data once encryption is
negotiated.
Or did I miss something important? It worked for me.
Have a nice day
--
I have a theory that it's impossible to prove anything, but I can't prove it.
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20080929/3f6cc5da/attachment-0003.pgp>
More information about the JDev
mailing list