MIME type mapping
by ZetaGecko | Add Your Comments | Atom/RSS
Last night, Tim Bray posted a request that 'for the next few months, whenever we're talking to a co-worker or a journo or from a conference stage, to say never say "Atom" without, within the next 45 seconds, also saying "which as we all know must be served as application/atom+xml or it won't work"'. We're working on getting Apache to include a MIME type mapping in their mime.types file for Atom. But even if they do, we still need to encourage all you server administrators out there to update your mime.types file with that information. And for all you who aren't server administrators out there, encourage your server administrators to do so.
I've noticed that when I install new versions of Apache, my old mime.types file does not get overwritten with the new one. This is good. If I had made some custom changes to the file, automatic overwriting would lose my changes. It's also bad, because unless you realize that it's not automatic, you may be using the newest Apache with an ancient set of MIME type mappings. To add Atom's MIME type, just add a line like this to your file:
application/atom+xml atom
Then restart Apache. You can also set up the mapping using AddType in httpd.conf. To do that, add a line like this to your file:
AddType application/atom+xml .atom
and restart. Without going into detail about what will happen if you don't do this, let me just say that it will help avoid a lot of headaches and/or non-standard behavior by Atom clients.
BTW, don't forget to use the .atom filename extension with your Atom feeds once you've done this!