package Apache::LC; use Apache::Constants qw(OK DECLINED NOT_FOUND); use Apache::File; use Apache::Log; use strict; sub handler { my $r = shift; return DECLINED unless $r->content_type eq 'text/html'; my $fh = undef; if (lc $r->dir_config('Filter') eq 'on') { $r = $r->filter_register; ($fh,my $status) = $r->filter_input; return $status unless $status == OK; } else { $fh = Apache::File->new($r->filename); return DECLINED unless $fh; } my $dirty = do {local $/; <$fh>}; $r->send_http_header('text/html'); print lc $dirty; return OK; } 1;