Check out:

http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html#rfc.section.6.2.1

"The subscriber MUST confirm that the hub.topic and hub.verify_token
correspond to a pending subscription or unsubscription that it wishes
to carry out. If so, the subscriber MUST respond with an HTTP success
(2xx) code with a response body equal to the hub.challenge parameter.
If the subscriber does not agree with the action, the subscriber MUST
respond with a 404 "Not Found" response."


So just wait around for auto-refreshing and return a 404 for
subscriptions you don't have and you're golden. Just be sure to return
200s for event deliveries on these same subscriptions. The 404 only
applies to subscription requests. If you reply with 404 to an event
delivery, the hub will just try again.

-Brett


On Sat, Aug 28, 2010 at 9:54 AM, Elias Mårtenson <[email protected]> wrote:
> In my application I subscribe and unsubscribe to many feeds. I keep
> track of this in a database on the app server side. Unfortunately (due
> to some bugs of mine) some subscription details were dropped which
> caused my database to be out of sync with the actual subscriptions
> from the hub. The net effect of this is that I get a lot of pushed
> notifications for feeds that I am actually not interested in.
>
> Is there a "proper" response code I should return to the hub when it
> contacts me with data for a subscription that I don't want?
> Essentially, something that should cause the hub to drop the
> subscription.
>
> I can't unsubscribe in the "proper" manner, because there is no
> information as to exactly which hub is sending the data. This is
> something that seems like an omission in the spec as far as I can
> tell. There is not enough information in a hub push message to
> actually unsubscribe from the feed.
>

Reply via email to