Snoopy’s RSS Hell

I’ve been fighting the good fight against RSS bugs in Moodle 1.8.2. The problem isn’t actually with Moodle, but with Snoopy, the PHP class that emulates as a web browser and which Magpie RSS library uses to fetch the feeds.

It seems that the current version of Snoopy has some issues with redirected URLs. It has trouble following 302 Page Moved messages and has an annoying habit of putting the port number into redirected URLs. While it’s not technically wrong to do this, not every web server thinks that the urls foo.com and foo.com:80 are the same (strange but true).

Case in point: The Wall Street Journal. The following feeds involve redirects (apparently served through FeedBurner, so I’m betting any feed using FeedBurner would have the same issue):

http://online.wsj.com/xml/rss/3_7011.xml
http://online.wsj.com/xml/rss/3_7014.xml

Read more