The Mudcat Café TM
Thread #57849   Message #911793
Posted By: GUEST,Jon
17-Mar-03 - 07:56 AM
Thread Name: PermaThread: Getting Mudcat MIDIs to Play
Subject: RE: PermaThread: Getting Mudcat MIDIs to Play
I think in most cases when we are not looking at a bad MIDI (and there are a handful in the dt), we are looking at browser specific problems.

One thing can cause problems at the server side is the setting of the MIME type which I think should be "audio/midi".

I'm pretty sure Mudcat provides links to MIDI files but some sites are a little more complicated, e.g. at folkinfo, the link is to a .php file and the MIDI is returned using that file. In this case, I have found that MIME type needs setting in the header ("Content-type: audio/midi") but that does not satisfy all browsers as some instead of obeying the MIME type look at file extension and try to work out how to deal with a .php file. The workaround to this that works on most (but not all) other browsers is to add a further header, "Content-Disposition" to suggest a file name with a ".mid" extension.

In cases where the above fails, a user can download the .php file and rename it to .mid as what is returned to the user is a genuine MIDI file. It's just a hard job to convince some browsers of that fact.

Don't know if any of that will help here but there's no harm sharing what we have learned so far.