Re: PerlSendHeader in "Location" directive (mod_perl 1.x)

[prev] [thread] [next] [Date index for 2005/01/11]

From: Stas Bekman
Subject: Re: PerlSendHeader in "Location" directive (mod_perl 1.x)
Date: 15:24 on 11 Jan 2005
Ciro The Spider-Man wrote:
> The documentation for configuring mod_perl at
> http://perl.apache.org/docs/1.0/guide/config.html  suggests having
> "PerlSendHeader On" inside the "Location /perl" directive, and then to
> add a "Files " directive to disable PerlSendHeader for NPH scripts.

Which section you refer to? I can only see nph mentioned in:
http://perl.apache.org/docs/1.0/guide/config.html#E_lt_LocationE_gt__Configuration
saying:

   PerlSendHeader On tells the server to send an HTTP headers to the
   browser on every script invocation. You will want to turn this off
   for nph (non-parsed-headers) scripts.

it doesn't say anything about files.

> This caused a bit of a problem, apparently caused by the fact that
> Location is merged AFTER Files, and overrides the former if the NPH is
> under the specified directory, effectively cancelling it out.

right,
http://perl.apache.org/docs/1.0/guide/config.html#How_Directory__Location_and_Files_Sections_are_Merged

> The best ways to fix this that I came up with are either to:
> A) have a seperate Location aliased to the same physical location,
> without the PerlSendHeader On  directive. This makes the Files
> directive unneccessary.
> 
> B) Remove the PerlSendHeader directive from the Location block
> completely, and instead add a Directory block for the location being
> Aliased (e.g. /usr/local/apache/) with PerlSendHeader set in that.
> Then the Files directive will correctly override PerlSendHeader and
> NPH scripts function correctly.
> 
> It's entirely possible (and even likely) that I missed something
> obvious and/or made some dumb error, so if there's a cleaner or more
> efficient way, or something I need to do to make the documented way
> work right, I'd be grateful for the info.

Patches to improve the explanation(s) will be gladly accepted.


        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

PerlSendHeader in "Location" directive (mod_perl 1.x)
Ciro The Spider-Man 08:38 on 11 Jan 2005

Re: PerlSendHeader in "Location" directive (mod_perl 1.x)
Stas Bekman 15:24 on 11 Jan 2005

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52