List Info

Thread: Best practices for handling stanzas of unknown type




Best practices for handling stanzas of unknown type
country flaguser name
Poland
2007-09-26 03:33:57
What are the best practices for handling stanzas with
unknown type
attribute?

I've read through RFCs (and bis) and these only say that
_client_ should
silently ignore it.
And server?

The problem is with <presence
type="invisible"/> specifically.
I've got complaints, that it is leaking users invisible
state when
forwarded without touching.

And what about IQs? Most of them are handled by server?
What should it do when receiving <iq/> of unknown
type? Error? Ignore?


-- 
  /_./o__ Tomasz Sterna
 (/^/(_^^'  Xiaoka.com
._.(_.)_  XMPP: smokuxiaoka.com


Re: Best practices for handling stanzas of unknown type
country flaguser name
United States
2007-10-17 17:58:38
On Wed, Sep 26, 2007 at 10:33:57AM +0200, Tomasz Sterna
wrote:
> What are the best practices for handling stanzas with
unknown type
> attribute?

Depends on the stanza.

For message, the RFC says default to "normal".

For presence, there is no default, so probably if the 'type'
is an
unknown value it is better to return an error (solves the
presence
leak). IMHO the error should be <bad-request/>.

For IQ, only the defined values make sense (structured
interaction) so 
here again I think it is proper to return a
<bad-request/> error.

I'll clarify this in rfc3920bis / rfc3921bis.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/


Re: Best practices for handling stanzas of unknown type
country flaguser name
United States
2007-10-17 18:07:07
> On Wed, Sep 26, 2007 at 10:33:57AM +0200, Tomasz Sterna
wrote:
>> What are the best practices for handling stanzas
with unknown type
>> attribute?
>
> Depends on the stanza.
>
> For message, the RFC says default to
"normal".
>
> For presence, there is no default, so probably if the
'type' is an
> unknown value it is better to return an error (solves
the presence
> leak). IMHO the error should be <bad-request/>.
>
> For IQ, only the defined values make sense (structured
interaction) so
> here again I think it is proper to return a
<bad-request/> error.
>
> I'll clarify this in rfc3920bis / rfc3921bis.

http://svn.xmpp.org:18080/browse/XMPP/trunk/internet-draft
s/draft-saintandre-rfc3920bis-05.xml?r1=1293&r2=1294


http://svn.xmpp.org:18080/browse/XMPP/trunk/internet-draft
s/draft-saintandre-rfc3921bis-04.xml?r1=1220&r2=1295


/psa


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )