Relative hub URL in wordpress.com updates!

13 views
Skip to first unread message

Waleed Abdulla

unread,
Mar 3, 2010, 11:05:19 PM3/3/10
to pubsubhubbub
I'm using the Python universal feedparser to parse updates coming from wordpress.com, but it's failing to extract the hub URL correctly. After investigating the issue, I found out that when I pull the feed the first time, I get a hub link correctly as follows:

<atom:link rel='hub' href='http://pinaysolobackpacker.wordpress.com/?pushpress=hub'/>

Then later I receive a POST with updated content, but this time the hub link is relative as follows:

<atom:link rel='hub' href='/?pushpress=hub'/>


I've setup my system to check the hub URL even on POST updates to detect any potential changes that might happen after the initial subscription, so I try to extract the hub url. Technically, I should expect either an xml:base attribute or a Location http header to use to resolve the relative path[1]. Neither is provided. I can, of course, do an exception for wordpress.com updates and try to extract the domain name from my database or from other elements in the feed, but I'd hate to add exceptions if at all possible. 

    Am I missing something, or is this a bug with Wordpress updates?

Regards,
Waleed





Joseph Scott

unread,
Mar 4, 2010, 12:05:07 AM3/4/10
to pubsub...@googlegroups.com
Can you go back and look again. I noticed that some feeds weren't
using the full URL for the hub and made changes to try harder to make
sure it was always the full URL.

I just looked at http://pinaysolobackpacker.wordpress.com/feed/ and it has:

in it now.

My intention is that the hub always list the full URL.

--
Joseph Scott
jos...@josephscott.org
http://josephscott.org/

Waleed Abdulla

unread,
Mar 4, 2010, 12:52:32 AM3/4/10
to pubsub...@googlegroups.com
Joseph,
    I'm still receiving updates with relative hub URLs. Here is an example I received seconds ago (irrelevant tags removed):

<channel>
<title>Apron Strings for Emily &#187; Proud Pet Owner</title>
<atom:link href="http://apronstringsemily.wordpress.com/wp-admin/post.php" rel="self" type="application/rss+xml" />
<atom:link rel="search" type="application/opensearchdescription+xml" href="http://apronstringsemily.wordpress.com/osd.xml" title="Apron Strings for Emily" />
<atom:link rel='hub' href='/?pushpress=hub'/>


    This is what I get POSTed to my PuSH end point. But if you pull the feed, you get the full hub URL. 

Regards,
Waleed

Joseph Scott

unread,
Mar 4, 2010, 1:39:31 AM3/4/10
to pubsub...@googlegroups.com
Thank you for clarifying exactly where this was showing up.

I believe I've tracked down what is causing that. I'll double check
it again in the morning (when I'm less tired) and if everything looks
good I'll deploy the fix. When that's done I'll follow up with
another email.


On Wed, Mar 3, 2010 at 10:52 PM, Waleed Abdulla <wal...@ninua.com> wrote:
>  This is what I get POSTed to my PuSH end point. But if you pull the feed,
> you get the full hub URL.

--

Joseph Scott

unread,
Mar 4, 2010, 12:45:51 PM3/4/10
to pubsub...@googlegroups.com
I've deployed a fix for this, you should now see the full URL for the
hub attribute inside the ping version of the feed.


On Wed, Mar 3, 2010 at 10:52 PM, Waleed Abdulla <wal...@ninua.com> wrote:
> This is what I get POSTed to my PuSH end point. But if you pull the feed,
> you get the full hub URL

--

Brett Slatkin

unread,
Mar 4, 2010, 12:49:55 PM3/4/10
to pubsub...@googlegroups.com
Thanks, Joseph!

Waleed Abdulla

unread,
Mar 4, 2010, 1:02:03 PM3/4/10
to pubsub...@googlegroups.com
Confirmed. It's working as expected now. Thanks for the quick fix, Joseph. 

Waleed



On Thu, Mar 4, 2010 at 9:45 AM, Joseph Scott <jos...@josephscott.org> wrote:

Julien Genestoux

unread,
Mar 7, 2010, 4:45:59 PM3/7/10
to pubsub...@googlegroups.com
Hey Joseph,

We have a few publishers who want to use one of Superfeedr's hub instead of the wp.com hub, so they can have a few stuff that we provide. I tell them to add the discovery link, but I'd be interested to know about what happens with your hub link?

Do you leave it by default? or remove it?

I'm asking because when there are 2 links (or more), it's not sur that everybody will subscribe to both and then, we can provide the publisher with stuff like analytics, or publisher-validation or even full export of the subscriptions :(

Can you explain how you guys behave in this case?

Thanks!

Joseph Scott

unread,
Mar 8, 2010, 11:27:48 AM3/8/10
to pubsub...@googlegroups.com
On Sun, Mar 7, 2010 at 2:45 PM, Julien Genestoux
<julien.g...@gmail.com> wrote:
> We have a few publishers who want to use one of Superfeedr's hub instead of
> the wp.com hub, so they can have a few stuff that we provide. I tell them to
> add the discovery link, but I'd be interested to know about what happens
> with your hub link?

Here's what I'd suggest if you only want to use a 3rd party hub and
not a hub built into WP. Don't use the PuSHPress plugin. There are
at least 2 other WordPress plugins that do nothing but at support for
3rd party hubs, one of those should work fine for these situations.


> Do you leave it by default? or remove it?


To get a bit more in depth, the PuSHPress plugin applies a WP filter
(called 'pushpress_hubs' ) to the array of hubs that PuSHPress uses.
By default it only has one hub in that array, itself. I did this to
allow other plugins or themes to be able to alter the hub list if they
really wanted to.


> I'm asking because when there are 2 links (or more), it's not sur that
> everybody will subscribe to both and then, we can provide the publisher with
> stuff like analytics, or publisher-validation or even full export of the
> subscriptions :(
> Can you explain how you guys behave in this case?


There's a thread on this list about what feed proxies should do (for
things like Feed Burner for instance) and at this point I think ping
chaining is probably the most reasonable approach. It doesn't exactly
fit in with what SuperFeedr does because it only provides clients at
the end of the chain with ping data, it's doesn't actually server
feeds (in the way that Feed Burner does for example).

Reply all
Reply to author
Forward
0 new messages