Thursday, March 16, 2006

Why does Windows rename things?

Actually, it is a security feature. I am talking about the extensions of files downloaded from the Internet. The reason it is a good thing is that if the MIME type is an audio file and the extension is exe, then guess what happens when your browser gets the file? It may likely just go ahead an run an executable program that you thought was an audio file. However, Windows does make some stupid assumptions about what extensions a file type may have. Our radio station has been downloading audio segments from the Public Radio Satellite System's Content Depot. The files are MPEG 1 Layer 2 (extension .mp2) files. The server sends them as MIME type audio/mpeg which Windows assumes is an MP3 file, so it automatically changes the extension to MP3. Frustrating. I found this workaround by digging in the registry. Under this key, "HKEY_CLASSES_ROOT\MIME\Database\Content Type\audio/mpeg", delete the value "Extension". After restarting IE and Firefox, both browsers left the extension mp2.

No comments: