1. Apache 1.2b3 & Location response header
I'm trying to utilize the Location response header. I'm running Apache
1.23b on a FreeBSD box w/ Netscape 3.0. I've followed the syntax of a
few CGI FAQ's. One in particular states...
BEGIN FAQ QUOTE:
Q4.23: Why doesn't:
print "Location: http://host/page.html\n"
work? Why does it only work the first time and get the redirects wrong
later?
A CGI program can only send one Location header. You also cannot send a
MIME content type if you want the
server to perform redirection. For example, this is not valid, though it
may work with some servers:
#!/usr/local/bin/perl
.
.
.
print "Content-type: text/plain\n"
print "Location: http://some.machine/some.doc\n\n"";
END FAQ QUOTE
I created a simple perl CGI script to test out this response header;
however, the server chokes and returns the following error...
BEGIN SERVER ERROR:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
of the time the error occurred, and
anything you might have done that may have caused the error.
END SERVER ERROR
BEGIN MY SIMPLE PERL TEST SCRIPT:
#!/usr/local/bin/perl
print "Location: lila.east.isi.edu/~moulton/env.html\n";
END MY SIMPLE PERL TEST SCRIPT
I am uncertain if this has to do with the server or with the Netscape
3.0 browser that I'm using. From the lack of documentation of this
"Location" response header I'm figuring its pretty new. I've got three
books on CGI development and only one mentions the "Location" response
header (in small detail).
I'm sure this is simply operator error; however, I've seen no concrete
documentation on how to properly use the "Location" response header. Is
there any documentation on which response headers Apache supports and
how to utilize them? Anyone know of an exceptionally good CGI FAQ to
boot?
Sincerely,
--
*****************************************************************
** Thomas Moulton **
** ----------------------------------------------------------- **
*****************************************************************
2. Monitoring I/O per process id
3. Apache 1.2b3 & setrlimit on Unixware 2.1
4. if_route.h or route.h?
5. Linux with Apache 1.2b3 on multiple addresses
6. closing a socket causes problems---why?
7. Apache 1.2b3 released
8. NIS on Linux
9. Apache 1.2b3 Compile Errors
10. PERL && mod_perl && FreeBSD && Apache
11. problems with (Apache && Solaris && mod_perl)
12. Apache && CGI && uid || back to cern?
13. Help with Apache SSL && Apache servers sharing content