[standards-jig] JEP-0060 Pub/Sub, error conditions

Ralph Meijer jabber.org at ralphm.ik.nu
Thu May 22 20:26:18 UTC 2003


Taken up hacking on idavoll again, I was wondering about subscribing and
unsubscribing. What should the component do when you try to subscribe when you
are already subscribed? I thought the best approach was to just return the
current subscription state.

Unsubscribing from a node when you are not subscribed to the node should
return a 401 according to the JEP. But why? This isn't really an error
is it? Just reporting success seems more logical because the end effect
(being unsubscribed) has been achieved.

On the other hand, trying to unsubscribe from a node from a different
base JID should (in the generic case) not be allowed (similar to subscribing)
and return a 401. This check should be done before checking whether
the user has actually subscribed to avoid probing.



More information about the Standards mailing list