> -----Original Message-----
> From: Jim Sproull [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 06, 2000 2:09 PM
> To: Geoffrey Young
> Cc: [EMAIL PROTECTED]
> Subject: RE: NEWBIE: appending to page content
> 
[snip]

> >
> 
>  Hi again Geoff.  Thanks for the quick answer.  I actually 
> tried adding
> 
>         return DECLINED if
>                 $r->content_type ne "text/html";

well this is essentially what Apache::SimpleReplace does - and I just tested
it on a directory that has +Indexes and it works just fine: content-type
httpd/unix-directory.

make sure you have PerlWarn On in your httpd.conf and are using strict at
the top of your module, just in case it's a coding problem ;)

> 
>  at the top, which seems to stop the connection dead in its 
> tracks (when
> content_type ne 'text/html') and I get this:
> 
> Making HTTP connection to jim.sitepak.net.
> Sending HTTP request.
> HTTP request sent; waiting for response.
> Alert!: Unexpected network read error; connection aborted.

what's your error_log say?

> 
>  I didn't think that looked right, but I wasn't exactly sure 
> what returning
> DECLINED did (in terms of the request process).  Any ideas?

returning DECLINED pretty much means that apache should skip over your
processing as though it never happened and let apache process the request as
it normally would.  The book explains it in detail very well...

In truth, I haven't seen anyone else return DECLINED from the PerlHandler
phase, but it seemed to work ok so I let Apache::SimpleReplace return
DECLINED to handle stuff like directory indexes (and any other unthought of
things).  I might have missed something, though...

--Geoff

> 
> Jim
> [EMAIL PROTECTED]
> 
> 
> > > }
> > >
> > >   This works fine for specified html pages.  However, when a
> > > DirectoryIndex
> > > page is called indirectly (http://www.foobar.com/ for
> > > instance), an item of
> > > type httpd/unix-directory gets printed.  So, I guess I'm
> > > asking 'in what
> > > stage does the DirectoryIndex get called, and why is it being
> > > ignored in
> > > this case?'
> > >
> > > Jim
> > > [EMAIL PROTECTED]
> > >
> >
> 

Reply via email to