Here's my handler...
package Foo::Test;
use strict;
use warnings;
use Apache::Constants qw(:common HTTP_OK);
sub handler {
my $r = shift;
my $uri = 'foo.html';
$r->content_type('text/plain');
$r->send_http_header;
$r->lookup_uri($uri);
$r->print("lookup_uri($uri) status = ",$r->status,"\n");
}
1;
and the conf...
<Location /test>
SetHandler perl-script
PerlHandler Foo::Test
</Location>
and the tests...
$ telnet localhost 8000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD /foo.html HTTP/1.0
HTTP/1.1 404 Not Found
Date: Thu, 05 Jul 2001 14:18:13 GMT
Server: Apache/1.3.20 (Unix) mod_perl/1.25
Connection: close
Content-Type: text/html; charset=iso-8859-1
Connection closed by foreign host.
$ GET http://localhost:8000/test
lookup_uri(foo.html) status = 200
Can any one enlighten me?
paul
--
Paul Sharpe Tel: +44 (20) 7407 5557
Miraclefish Ltd. Fax: +44 (20) 7378 8711
Studio 12 mailto:[EMAIL PROTECTED]
37 Tanner Street http://www.miraclefish.com/
London SE1 3LF
UNITED KINGDOM