Invalid 'session' packet is being sent during login
There is no <session xmlns="urn:ietf:params:xml:ns:xmpp-session" /> in XMPP RFC 3920. It's a Jabber legacy that was dropped from XMPP.
Gajim is still sending session packet and breaks when server does not implement it.
\<!-- Out -->
\<iq type="set" id="6">
\<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
\</iq>
\<!-- In -->
\<iq xmlns='jabber:client' to='smoku@xiaoka.com/Gajim' from='smoku@xiaoka.com/Gajim' id='6' type='error'>
\<error type='cancel' code='501'>
\<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
\</error>
\<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
\</iq>
\<!-- Out -->
\</stream:stream>
\<!-- In -->
\</stream:stream>