Forum

/ Home \ \ Subjects /



Subject: cgi mimetype

23/03/2007 02:17 cammyhost:
what is the cgi mime type, i want to allow cgi files, in my free hosting service using smallserv http server :)
23/03/2007 04:02 Max:
cgi - it is executable script. It self return mime type at first of output. E.g. if cgi is Perl script, the line
print "Content-type: text/html\r\n";
used for return html page.
24/03/2007 03:35 cammyhost:
so what do i have to put for the mime type for cgi then?
24/03/2007 04:33 Max:
No reason to direct mime type for CGI. You may direct anything, it never be used.
Of course if you would like to return the file with .cgi extension as just file (without execute it) you may direct required type.

To allow CGI:
1. In servers option direct CGI identifer and put your script in directory with this identifer. (You may direct e.g .cgi as identifer and in this case you may put the file anywhere, or also you may use option "Run system file" and set attribute "SYSTEM" for scripts)

2. Direct interpreter for .cgi extension. E.g. c:\perl\bin\perl.exe


User: Password: New user:   Save password: