PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Firefox 2.0 tries to download search.cgi in CGI mode.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Firefox 2.0 tries to download search.cgi in CGI mode.

    Ok here's an odd one, CGI server mode under IIS on a win2K dev box. IE works just fine, but Firefox 2.0.0.11 tries to download search.cgi as a file when searching.... thus breaking the page and no search form is generated.

    I'm calling search.cgi from an asp page (listing below) which is called by an iframe in another page... (same behavior is seen when calling it directly.)
    Code:
    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY>
    
    <%
     Dim WshShell, env<br>
     Set WshShell = CreateObject("WScript.Shell")<br>
     Set env = WshShell.Environment("Process")<br>
     env.Item("REQUEST_METHOD") = "GET"<br>
     env.Item("QUERY_STRING") = Request.QueryString<br>
     set oExec = WshShell.Exec(Server.MapPath("search.cgi"))<br>
     oExec.StdOut.ReadLine() ' skip the HTTP header line<br>
     Response.Write(oExec.StdOut.ReadAll())
    %>
     
    </BODY>
    </HTML>
    Any ideas on how to fix this? I'm sure its probably something simple....
    There are 10 types of people in this world: Those who understand Binary and those who don't.

  • #2
    Normally if you get a prompt to download a script (as opposed to executing the script on the server) then it is a sure sign that the server is not configured correctly. And that is almost definitely the case here. It is interesting however that you only see the problem in Firefox, we haven't seen this partial working behaviour before.

    There is very little difference between the HTTP GET request from IE and Firefox. The main difference are in the user-agent field and the accept fields. So maybe your server / site is doing browser sniffing on the user agent string. Or maybe the MIME types are not being set correctly, resulting in the inconsistent behaviour.

    I would initially use WGET with different user agent strings to test the behaviour of your site.

    Getting CGI to work on IIS is a pain.

    Comment

    Working...
    X