> Try HEAD on this script.
> 
> #!/usr/local/bin/perl -w
> use CGI;
> 
> my $q = CGI->new;
> 
> print $q->header, $q->start_html,
>       join( "<BR>\n", map { "$_ : $ENV{$_}" } keys %ENV),
>       $q->end_html;

I'm still getting the headers. I also have this behavior on other boxes
(one on our redhat server and on one of our client's solaris server),
thus I suppose it's not a platform issue.

Here is how it looks on my box:


[root@frogette /]# cat /opt/mod_perl/test.cgi 
#!/usr/bin/perl -w
use CGI;

my $q = CGI->new;

print $q->header, $q->start_html,
join( "<BR>\n", map { "$_ : $ENV{$_}" } keys %ENV),
$q->end_html;
[root@frogette /]# 


[root@frogette /]# /usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd restarted
[root@frogette /]# 


And here is what I get:

[root@frogette /]# lynx --head --dump http://mod_perl
HTTP/1.1 200 OK
Date: Fri, 23 Nov 2001 15:14:24 GMT
Server: Apache/1.3.19 (Unix) mod_perl/1.25
Connection: close
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
</HEAD><BODY>QUERY_STRING : <BR>
HTTP_ACCEPT_LANGUAGE : en<BR>
REMOTE_PORT : 34961<BR>
HTTP_USER_AGENT : Lynx/2.8.4dev.16 libwww-FM/2.14 SSL-MM/1.4.1
OpenSSL/0.9.6<BR
>
HTTP_ACCEPT : text/html, text/plain, audio/mod, image/*, video/*,
video/mpeg, a
pplication/pgp, application/pgp, application/pdf, message/partial,
message/exte
rnal-body, application/postscript, x-be2, application/andrew-inset,
text/richte
xt, text/enriched, x-sun-attachment, audio-file, postscript-file,
default, mail
-file, sun-deskset-message, application/x-metamail-patch,
application/msword, t
ext/sgml, video/mpeg, image/jpeg, image/tiff, image/x-rgb, image/png,
image/x-x
bitmap, image/x-xbm, image/gif, application/postscript, */*;q=0.01<BR>
PERL_SEND_HEADER : On<BR>
HTTP_HOST : mod_perl<BR>
GATEWAY_INTERFACE : CGI-Perl/1.1<BR>
SCRIPT_NAME : /<BR>
SERVER_NAME : mod_perl<BR>
HTTP_ACCEPT_ENCODING : gzip, compress<BR>
MOD_PERL : mod_perl/1.25<BR>
SCRIPT_FILENAME : /opt/mod_perl/test.cgi<BR>
PATH :
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/jhiver/bin:/opt/j2sdk1
.3.1/bin:/usr/local/bin<BR>
SERVER_ADDR : 127.0.0.1<BR>
SERVER_PROTOCOL : HTTP/1.0<BR>
SERVER_SIGNATURE : <ADDRESS>Apache/1.3.19 Server at mod_perl Port
80</ADDRESS>
<BR>
SERVER_SOFTWARE : Apache/1.3.19 (Unix) mod_perl/1.25<BR>
SERVER_ADMIN : root@mod_perl<BR>
REMOTE_ADDR : 127.0.0.1<BR>
DOCUMENT_ROOT : /usr/local/apache/htdocs<BR>
REQUEST_URI : /<BR>
REQUEST_METHOD : HEAD<BR>
SERVER_PORT : 80</BODY></HTML>
[root@frogette /]# 

Duh... That's a lot of info for a head request :-)
Cheers,
-- 
== \______ =====================================================
   /\____/\  IT'S TIME FOR A DIFFERENT KIND OF WEB 
  / /\__/\ \
_/_/_/\/\_\_  Jean-Michel Hiver - Software Director
 \ \ \/*/ /   [EMAIL PROTECTED]    +44 (0)114 221 4968
  \ \/__\/   
   \/____\   VISIT HTTP://WWW.MKDOC.COM 
== / ===========================================================

Reply via email to