You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by tim fulcher <fu...@drink.bt.co.uk> on 2001/06/08 18:21:31 UTC

Apache::AutoIndex & SuppressHTMLPreamble directive

Has anybody else noticed a bug with Apache::AutoIndex & the IndexOptions
SuppressHTMLPreamble directive ? First time I tried using this I got a
warning:

"IndexOptions unknown/unsupported directive suppresshtmlpreamble"

Then I noticed that  line 37 of AutoIndex.pm has a typo -

suppresshtmlperamble => SUPPRESS_PREAMBLE
                   ^^^^

I edited that & tried again - it worked of sorts, in that Apache didn't
barf, but the resultant HTML contains 2 head sections:-

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML><HEAD>
<TITLE>Directory index of
/tools/</TITLE></HEAD><BODY><H2>Directory index of
/tools/</H2>
<PRE><HTML>
<HEAD>
<title>fooo</title>
<link rel="stylesheet" href="/css/ebtheme.css">
</HEAD>
<BODY><h3>can u see this header name directive?</h3>
</PRE>


I'm using v 0.08 of Apache::AutoIndex - couldn't see a later version on
CPAN.


Tim


Re: Apache::AutoIndex & SuppressHTMLPreamble directive

Posted by "Philippe M . Chiasson" <go...@cpan.org>.
On Fri, Jun 08, 2001 at 05:21:31PM +0100, tim fulcher wrote:
> 
> Has anybody else noticed a bug with Apache::AutoIndex & the IndexOptions
> SuppressHTMLPreamble directive ? First time I tried using this I got a
> warning:
> 
> "IndexOptions unknown/unsupported directive suppresshtmlpreamble"
> 
> Then I noticed that  line 37 of AutoIndex.pm has a typo -
> 
> suppresshtmlperamble => SUPPRESS_PREAMBLE
>                    ^^^^

Typo noted.

> I edited that & tried again - it worked of sorts, in that Apache didn't
> barf, but the resultant HTML contains 2 head sections:-

I see, well, as Apache::AutoIndex re-implements mod_autoindex in perl,
I probably left that part out.  A simple if() should address this.

Thanks, will try to get a patched version on CPAN this week-end.

P.S. Patch welcome ;-)

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
> "http://www.w3.org/TR/REC-html40/loose.dtd">
> <HTML><HEAD>
> <TITLE>Directory index of
> /tools/</TITLE></HEAD><BODY><H2>Directory index of
> /tools/</H2>
> <PRE><HTML>
> <HEAD>
> <title>fooo</title>
> <link rel="stylesheet" href="/css/ebtheme.css">
> </HEAD>
> <BODY><h3>can u see this header name directive?</h3>
> </PRE>
> 
> 
> I'm using v 0.08 of Apache::AutoIndex - couldn't see a later version on
> CPAN.
> 
> 
> Tim
> 
> 

-- 
+-----------------------------------------------+
| Philippe M. Chiasson  <go...@cpan.org>        |
| SmartWorker http://www.smartworker.org        |
|     IM : gozerhbe  ICQ : gozer/18279998       |
|   64.8% computer corrupt according to         |
| http://www.freespeech.org/ljk/purity.html     |
+-----------------------------------------------+
I'm always amazed at how many people expect to be both
elitist and populist simultaneously. 
	-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'