| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered
Join Date: Sep 2006
Location: Adelaide, Australia
Posts: 12
|
Handling Unexpected RSS Issues
I've been working on some PHP coding that generates a "ten most recent photos" RSS feed, for a particular member on an online community. The RSS feed takes the member ID (the owner of the photos) as a GET value. The PHP sends the "401 Unauthorized" HTTP code so that the browser or RSS reader prompts the user for their login details to see if they can access the feed. This all works great. However, after looking through the RSS2 specs I cant seem to find a way to generate the feed when something goes wrong. Say for example the database is inaccessible, or the member has no photos. I could of course produce a web page that explains the issue, but I don't think that will be too helpful to a RSS reader (plus it makes no sense for a XML file to spontaneously be XHTML). The other option is to simply return another HTTP code, like content no longer available or service error, but I'm not sure how the browsers or readers would respond to that either. Lastly, I could just generate the feed, and the only item contained within is a error message, linking to a page explaining the problem. This seems to be the most logical approach, but still doesn't sit right with me. Does anyone have any ideas or knows if the RSS2 spec does include information on how we should deal with it in a standardized way? Cheers |
|
|
|
![]() |