fastCGI and redirect scripts

Michael Smith (
Wed, 03 Jul 1996 15:03:03 +0100

Message-Id: <>
Date: Wed, 03 Jul 1996 15:03:03 +0100
From: Michael Smith <>
Subject: fastCGI and redirect scripts

Has anybody had any experience with fastCGI and scripts that cause
redirections?  Well this doesn't work (for me at least).  Consider the
following simple perl script:


use FCGI;

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

Well if I access it through normal CGI, fine - I get redirected to the
fastCGI home page.  But if I access through fastCGI I get "document
contains no data"

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?

Thanks for any help

Michael Smith
fastCGI's #1 fan