Old 31-05-2007, 06:18   #1 (permalink)
LazyMoon
Registered
 
LazyMoon's Avatar
 
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
  Reply With Quote
Old 08-06-2007, 00:28   #2 (permalink)
proc355
Senior Member
 
proc355's Avatar
 
Join Date: Sep 2006
Location: Glasvegas
Posts: 865
ummm, read the spec?

return an item with contents reflecting the error, no?
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8