mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jakl <jakl.mich...@gmail.com>
Subject Re: from addresses c2s [Re: [vysper][pubsub] Realworld demo with realworld client]
Date Sun, 05 Jul 2009 14:32:45 GMT
Hi!

On Sun, Jul 5, 2009 at 14:50, Bernd
Fondermann<bernd.fondermann@googlemail.com> wrote:
> On Sun, Jul 5, 2009 at 12:21, Michael Jakl<jakl.michael@gmail.com> wrote:
>> Second, the RFC3929 9.1.2 says this:
>> When a server receives an XML stanza within the context of an
>> authenticated stream qualified by the 'jabber:client' namespace, it
>> MUST do one of the following:
>>
>>   1. validate that the value of the 'from' attribute provided by the
>> client is that of a connected resource for the associated entity
>>   2. add a 'from' address to the stanza whose value is the bare JID
>> (<node@domain>) or the full JID (<node@domain/resource>) determined by
>> the server for the connected resource that generated the stanza (see
>> Determination of Addresses (Determination of Addresses))
>
> We do (1.), so we are fine. Some stanzas come without from addresses,
> the most prominent probably being availability presence.

I've read it like this: IF there is an "from", THEN (1.), ELSE (2.). But the
Do EITHER (1.) OR (2.) is also a valid interpretation I haven't seen.

>> I think it would be easier to just add the "from" attribute to the
>> stanza than have each component that requires it check wether one is
>> included, if not, take the one from the SessionContext.
>
> I think we should write a utility method which provides this info.

I've done that for my PubSub module now.

Thanks for the clarifications,
Michael

Mime
View raw message