Sat, 25 Sep 2004

It's the E2E argument

Why is it a bad idea for the RSS enclosure tag to have an attribute for the mime type of an enclosed object? Partly for efficiency, but more importantly for accuracy. The mime type in the attribute can never improve on the value reported by the host of the enclosed object. It adds nothing by reiterating the value reported by the host. It can, however, make things worse by getting the value reported by the host wrong.

This is an instance of the end to end argument. The ultimate client has to check the mime type, and the ultimate host has to get the mime type right. The RSS enclosure generator can't do anything to improve on the relationship between the endpoints, it can only get in their way.

What, for example, happens when the host takes down a previously valid URL which had been pointed to in an enclosure element? The enclosure generator has the mime type of the URL cached -- correctly -- as audio/mpeg, but now the resource is a 404 status code with a text/html body. The enclosure generator would have to re-check the resource from time to time and rewrite the RSS with the new mime type, which is a gibberish situation.

permalink

trackback

 
Name:
Title:
Comments: