×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    2,426

    Setting MIME type for CGI output (Web and WAP versions have same extension)

    Hello!

    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:

    http://chanter.com/cgi-bin/baserun.exe?_cfg=e:InetPubClientschanter.comcgi-binpbasewap.cfg

    (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:

    http://chanter.com/cgi-bin/baserun.exe?_cfg=e:InetPubClientschanter.comcgi-binpbasespec.cfg

    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!
    Yves Dehnel


    Posted by Yves Dehnel, wap@chanter.com
    on May 19, 2000 at 23:51

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Posts
    2,426

    RE: Setting MIME type for CGI output (Web and WAP versions have same extension)

    Posted by Nick Loman, nick@loman.net
    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,

    Nick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •