aboutsummaryrefslogtreecommitdiff
path: root/lib/Apache/Inject.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Apache/Inject.pm')
-rw-r--r--lib/Apache/Inject.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/Apache/Inject.pm b/lib/Apache/Inject.pm
index 0670e69..bf50728 100644
--- a/lib/Apache/Inject.pm
+++ b/lib/Apache/Inject.pm
@@ -31,8 +31,7 @@ sub Inject {
# Add relevant directives to current configuration
$parms->add_config([
- 'SetHandler perl-script',
- 'PerlResponseHandler Apache::Inject::Handler',
+ 'PerlOutputFilterHandler Apache::Inject::Filter',
qq{PerlSetVar InjectHead "$head"},
qq{PerlSetVar InjectFoot "$foot"},
]);
@@ -164,25 +163,26 @@ to a hyphen.
=head1 OPERATION
Behind the scenes, the Inject directive works as an alias for
-PerlResponseHandler and PerlSetVar. For example, C<Inject head.html
-foot.html> results in the following configuration being added:
+PerlOutputFilterHandler and PerlSetVar. For example, C<Inject
+head.html foot.html> results in the following configuration being
+added:
- PerlResponseHandler Apache::Inject::Handler
+ PerlOutputFilterHandler Apache::Inject::Filter
PerlSetVar InjectHeader head.html
PerlSetVar InjectFooter foot.html
-This results in Apache::Inject::Handler being registered as a handler
-for requests to the current directory or location.
+This results in Apache::Inject::Filter being registered as an output
+filter for requests to the current directory or location.
-Apache::Inject::Handler accepts all requests to files where the
-content type is C<text/html>. It reads the contents of the requested
-file, as well as the contents of the C<InjectHeader> and C<InjectFooter>
-files, concatenates them intelligently and prints their combined
-contents.
+Apache::Inject::Filter accepts all requests where the content type
+is C<text/html>. It receives the contents of the original page
+from Apache and, in addition, reads the contents of the C<InjectHeader>
+and C<InjectFooter> files. It then concatenates all of these
+intelligently and forwards their combined contents.
=head1 CAVEATS
-Apache::Inject::Handler uses regular expressions to determine the
+Apache::Inject::Filter uses regular expressions to determine the
proper location of the injected header. It supports all valid HTML.
However, it does not take into account that embedded CSS and
JavaScript code can contain strings that look like valid opening
@@ -194,11 +194,11 @@ without the module; it is only the tests that require it.
=head1 DIAGNOSTICS
-Apache::Inject and Apache::Inject::Handler log all errors and
+Apache::Inject and Apache::Inject::Filter log all errors and
warnings to the Apache log file. Below is a list of all issued
errors and warnings.
-Note that whenever Apache::Inject::Handler issues an error or a
+Note that whenever Apache::Inject::Filter issues an error or a
warning, this means that it also declines the request, letting
Apache handle it as it would if the Inject directive were not used.
@@ -227,7 +227,7 @@ exist.
=item Warning: Declining request due to empty document root
-This warning is issued if Apache::Inject::Handler for some reason
+This warning is issued if Apache::Inject::Filter for some reason
cannot retrieve the current document root from Apache.
=back