Hi,
a cgi script that returns the correct mime type would look like this:
This is from a perl script I have somewhere:
# VMI file
# this MUST BE the FIRST line the cgi-script returns! Make sure
# you append two \n at the end, dump the binary data of the VMI
# thereafter
print "Content-type: application/x-dreamcast-vms-info\n\n";
# VMS file
# this MUST BE the FIRST line the cgi-script returns! Make sure
# you append two \n at the end, dump the binary data of the VMI
# thereafter
print "Content-type: application/x-dreamcast-vms\n\n";
to dump the file in binary you may use something like this in perl:
open(FILE, "foo.vmi");
binmode(FILE); undef $/; # output binary and no line separator
print <FILE>;
close(<FILE>);
I am not sure the code above works but I wanted to give a hint.
Leo.
--
http://www.mud.de