[jdev] features stanza on a s2s dialback connection

Matthew Wild mwild1 at gmail.com
Thu Jan 5 20:20:47 UTC 2012


Hi,

On 5 January 2012 14:42, Nobuo Ogashiwa <ogashiwa at c.kyoai.ac.jp> wrote:
> Dear all,
>
> Now I'm developing a XMPP server software which supports s2s connection,
> and now I faced a problem of features stanza on a s2s dialback connection.
> If someone knows a right solution, please let me know. The problem is following:
>
> In a case of s2s dialback connection from google talk server,
> If it send a <stream:features> stanza to the google talk server,
> then the google talk server replies a 'not yet authorized' error.
> If it don't send <stream:features> stanza,
> the google talk server replies a <db:verify> stanza and it can
> continue a dial back sequence.
>

Perhaps Google's stream did not have version='1.0' in the header? If
not, I don't think you should send <stream:features>.

I would also make sure you have xmlns:db correctly set in your stream header.

> If someone knows the right solution, standard sequence, or pointer to
> standards of this,
> please let me know.
>

Double-check the things I suggested above. Existing server
implementations do not have any problems, so you're definitely missing
something.

> Anyway, we have temporarily implemented a following two workarounds :
>
> (1) 50% send features stanza, 50% don't send a features stanza,
>  it is just like following code:
>  if (rand()%2==0) { send_features_stanza(); return; }
>  else { return; }
>

Ick.

> (2) wait <db:verify> stanza to receive for 5 seconds, if nothing
> received, then send <stream:features> stanza
>

Ick.

> Both of these workarounds works well for now.
>

If you say so :)

Regards,
Matthew


More information about the JDev mailing list