Re: fastCGI and redirect scripts

Mark Brown (
Fri, 05 Jul 1996 18:37:37 -0400

Message-Id: <>
Subject: Re: fastCGI and redirect scripts 
In-Reply-To: Michael Smith's message of "Wed, 03 Jul 1996 15:03:03 BST."
Date: Fri, 05 Jul 1996 18:37:37 -0400
From: Mark Brown <>

Michael Smith reports:

    Consider the following simple perl script:

    use FCGI;
    while (FCGI::accept() >= 0) {
        print "Location:\n\n"

    Accessing via telnet I see the following

    1) CGI

    HTTP/1.0 302 Found
    Date: Wed, 03 Jul 1996 14:01:23 GMT
    Server: Apache/1.1b4
    Content-type: text/html

    <HEAD><TITLE>Document moved</TITLE></HEAD>
    <BODY><H1>Document moved</H1>
    The document has moved <A HREF="">here</A>.<P>
    Connection closed by foreign host.

    2) FastCGI

    HTTP/1.0 200 OK
    Date: Wednesday, 03-Jul-96 14:01:27 GMT
    Server: Apache/1.1b4
    MIME-version: 1.0

    Can anybody tell me what I am doing wrong - or what apache/fastCGI
    is doing wrong?

Reading the code, it looks like the mod_fastcgi header parser
requires white space (blank or tab) following the colon.  Apparently
the Apache CGI module's header parser doesn't.

        print "Location:\n\n"

and see if that works.

This is probably a bug (have to consult the CGI spec), but see if
this works around it.