aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorroot <root@rbsd.ankarstrom.se>2021-04-26 23:36:30 +0000
committerroot <root@rbsd.ankarstrom.se>2021-04-26 23:36:30 +0000
commit356ace1a5f618d00f145b640acb989dd0197e8d6 (patch)
tree0d04c610d49a213d4be1403bb81954e7ef7e6677 /README
parent07b6aaa59257778fba1f805ee4051baf1917980b (diff)
downloadApache-Inject-356ace1a5f618d00f145b640acb989dd0197e8d6.tar.gz
Use filter instead of handler
This makes it work for HTML content that has already been processed, e.g., by PHP. This change was delightfully easy to make.
Diffstat (limited to 'README')
-rw-r--r--README28
1 files changed, 14 insertions, 14 deletions
diff --git a/README b/README
index 1f396ca..4a663c0 100644
--- a/README
+++ b/README
@@ -99,23 +99,24 @@ SYNTAX
OPERATION
Behind the scenes, the Inject directive works as an alias for
- PerlResponseHandler and PerlSetVar. For example, "Inject head.html
+ PerlOutputFilterHandler and PerlSetVar. For example, "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 "text/html". It reads the contents of the requested file, as
- well as the contents of the "InjectHeader" and "InjectFooter" files,
- concatenates them intelligently and prints their combined contents.
+ Apache::Inject::Filter accepts all requests where the content type is
+ "text/html". It receives the contents of the original page from Apache
+ and, in addition, reads the contents of the "InjectHeader" and
+ "InjectFooter" files. It then concatenates all of these intelligently
+ and forwards their combined contents.
CAVEATS
- Apache::Inject::Handler uses regular expressions to determine the proper
+ 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 and closing HTML tags.
@@ -125,11 +126,10 @@ CAVEATS
module; it is only the tests that require it.
DIAGNOSTICS
- Apache::Inject and Apache::Inject::Handler log all errors and warnings
- to the Apache log file. Below is a list of all issued errors and
- warnings.
+ 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 warning,
+ 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.
@@ -152,7 +152,7 @@ DIAGNOSTICS
exist.
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.
AUTHOR