ejabberd zlib compression

My goal is using jabber with zlib compression. Before using compression, I can start to use "auth" element to authenticate jabber and I can login successfully. Since I'm using zlib compression, the starttls element is missing and we can choose either starttls or zlib. I'm writing my own jabber client.

My question is:
1. what's the next step for the following steam negotiation?
2. do you have example of steam negotiation which is using zlib compression?

Really appreciate for the help.

<pre>
RECEIVED:
<stream:stream xmlns='jabber:client' xml:lang='en' from='natalius-vaio' id='3939937389' version='1.0' xmlns:stream='http://etherx.jabber.org/streams'></stream:stream>
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'></starttls>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='4tUF5PLCsYGpwAj5xfQ9p+zIzTU='></c>
<register xmlns='http://jabber.org/features/iq-register'></register>
</stream:features>

SENT:
<compress xmlns="http://jabber.org/protocol/compress"><method>zlib</method></compress>

RECEIVED:
<compressed xmlns='http://jabber.org/protocol/compress'></compressed>

RECEIVED:
<?xml version="1.0"?><stream:stream to="natalius-vaio" xmlns="jabber:client"
<stream:stream xmlns='jabber:client' xml:lang='en' from='natalius-vaio' id='4121654034' version='1.0' xmlns:stream='http://etherx.jabber.org/streams'></stream:stream>
<stream:features>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='4tUF5PLCsYGpwAj5xfQ9p+zIzTU='></c>
<register xmlns='http://jabber.org/features/iq-register'></register>
</stream:features>
</pre>

natalius wrote: Since I'm

natalius wrote:

Since I'm using zlib compression, the starttls element is missing and we can choose either starttls or zlib. I'm writing my own jabber client.

Reading this ticket, it seems client first setups TLS, later zlib:
EJAB-499: Support Zlib compression after STARTTLS encryption

I try to login in ejabberd 2.1.6 with Psi 0.14, with three different configurations, and the WebAdmin page of the user shows three different information:

    * Psi with TLS (plain://127.0.0.1:38468#ejabberd@localhost)
    * Psi with ZLIB (zlib://127.0.0.1:38467#ejabberd@localhost)
    * Psi with TLS and ZLIB (tls+zlib://127.0.0.1:38466#ejabberd@localhost)

When I login with tls+zlib, ejabberd.log shows:

=INFO REPORT==== 4-Jan-2011::16:14:57 ===
I(<0.364.0>:ejabberd_listener:281) : (#Port<0.4430>) Accepted connection {{127,0,0,1},49676} -> {{127,0,0,1},5222}

=INFO REPORT==== 4-Jan-2011::16:14:58 ===
I(<0.404.0>:ejabberd_c2s:767) : ({socket_state,ejabberd_zlib,{zlibsock,tls,
 {tlssock,#Port<0.4430>,#Port<0.4432>},#Port<0.4434>},<0.403.0>})
 Accepted authentication for badlop by ejabberd_auth_internal

=INFO REPORT==== 4-Jan-2011::16:14:58 ===
I(<0.404.0>:ejabberd_c2s:890) : ({socket_state,ejabberd_zlib,{zlibsock,tls,
 {tlssock,#Port<0.4430>,#Port<0.4432>},#Port<0.4434>},<0.403.0>})
 Opened session for badlop@localhost/Psi with TLS and ZLIB
Syndicate content