Resolving issues with WordPress RSS feeds for Avalaunch on XBox

Jan 22nd, 2005   7:12 pm

So you may, or may not, have noticed that using the RSS feeds that WordPress dynamically generates don’t work in the latest (at time of post) release of Avalaunch. This appears to be because of two things.

Firstly, it seems to rely on Content-Length header being set, and because WP uses PHP to dynamically generate the RDF/XML, this header is not sent. Secondly, it takes issue with the xml type delcaration tag and the RSS version tag being on the same line.

So to solve it I wrote a wrapper CGI script which essentially calls that wp-rss.php script (locally) and saves the output to file. I then issue a 302 redirect so that Avalaunch goes to that recently written (and now static) file, and let the web server handle the Content-Length header. I could have done this in PHP (just built up the RSS in a string and got it’s length, but that’d mean a lot of tinkering with WP, which would make future upgrades more hassle.

The script is esentially 2 lines ..

#!/usr/bin/perl
system( "php wp-rss.php > rss.xml" );
print "Location: http://www.domain.com/blog/rss.xml\n\n";

.. which was easy to do once I could actually figure out what it was that the Avalaunch RSS parser didn’t like!!

css.php