Le 1 juin 2012 à 10:36 CEST, Tuomas Koski a écrit :
> Hi,
>
> (warning, I don't know the node channel server so just guessing here.)
>
> On 1 June 2012 10:00, Denis Washington <
den...@online.de> wrote:
>> Hi,
>>
>> I am currently in the process of implementing POST on channel nodes in the
>> HTTP API server, and I was wondering how much sanity checking I'll have to
>> do before I send an Atom entry to the buddycloud server.
>>
>> - Does the buddycloud server check if the <author> tag actually matches the
>> JID of the publisher? If not, should it? Or does the server even fill in the
>> <author> itself if none is provided?
>
> I hope it does :-) It has to be the job of the "inbox". The
> experimental java server does this check.
> And I think the server should fill the author if it's missing.
I don't know if the server checks that the author matches the JID, but I
doubt it: there are posts without an author in Lloyd's channel (and some
older ones in dodo's channel).
Actually I had to add checks for that in bccc (see Atom.author() in
bccc/client/atom.py): in Lloyd's channel there are posts with no
<author> at all, in dodo's there are some with empty <author></author>.
Besides, adding validity checks on the server would be tricky: if
a.com
reject invalid Atoms from
cli...@a.com, what should it do with invalid
Atoms coming from another server?
> On 1 June 2012 10:00, Denis Washington <
den...@online.de> wrote:
>> - What about the <published> date? Could an XMPP client write anything in
>> there, or does the server fill in / replace <published> tags with its own
>> versions? (It really should, because we cannot trust the timestamps of the
>> bc clients and server, or even the HTTP and bc server, to be in sync.)
>>
>> - Given that the post-to-channel example on the "XMPP XEP" wiki page [1]
>> doesn't contain an <id>, I guess this is filled in to match the node item
>> ID?
>
> ID is mandatory element of valid atom, right?
>
> Again, in the experimental java server the ID was filled by the server to match
> the correct ID from the servers data system.
Same in the Node server: bccc doesn't add any ID before publishing to a
channel, it's done on the server.
> On 1 June 2012 10:00, Denis Washington <
den...@online.de> wrote:
>> If you agree that they are a good idea, I could hack on the buddycloud
>> server code to add them if they are not there yet. This would be a much
>> better solution than to put this into the HTTP server (and, thus, still
>> allow clients to circumvent them by simply using XMPP).
>
> +1 from me to check that the validation is done correctly on the "node
> channel server".
> +1 also to implement any new features needed on the node server too. :-)
>
> Cheers,
> --
> Tuomas
--
Thomas/Schnouki