Setting MIME type for CGI output (Web and WAP versions have same extension)
Sorry if this sounds like a newbie question, but I'm just getting started with WAP... and I'd like to produce my first site with limited resources (a leased "virtual" server and a simple CGI database).
I'm trying to set up a WAP site which will provide access to a database of concerts, but I'm running into problems with MIME types of the CGI application output.
The database is served by a small CGI program called BASERUNNER.EXE, which is accessed through the URL:
(This is the URL which provides the WML-formatted output).
I'm already using the same database to run the regular HTML site, with a similar URL:
As you can see, the extension is the same. Therefore, the WAP version is not recognized by WAP devices because of the wrong header.
How do I tell the server how to send the correct MIME header so that WAP browsers recognize the output? And is it possible to make these 2 configurations (WML
output and HTML output) coexist on the same server?
The site is hosted on a shared "virtual" server (IIS 4.0). I'm not the admin, but I could ask them to set the MIME types it I could find the correct parameters.
Thanks in advance!
Posted by Yves Dehnel, firstname.lastname@example.org
on May 19, 2000 at 23:51
RE: Setting MIME type for CGI output (Web and WAP versions have same extension)
Posted by Nick Loman, email@example.com
on May 20, 2000 at 19:42
You should be able to make the CGI program be the thing to output the MIME type. In my experience the first line of most C/perl CGI programs is something like:
print "Content-type: text/htmlnn";
You need to change this to:
print "Content-type: text/vnd.wap.wmlnn";
Hope this helps,