Age | Commit message (Collapse) | Author |
|
Apparently, an Apache filter can be invoked more than once for a
single request, depending on the size of the contents [1].
Luckily, though, a filter can save state in the ctx field [1,2].
The solution isn't perfect, as it can't handle arbitrary long heads,
but they're very unlikely.
[1] https://httpd.apache.org/docs/2.4/developer/output-filters.html#invocation
[2] https://perl.apache.org/docs/2.0/user/handlers/filters.html#Introducing_Filters
|
|
This makes it work for HTML content that has already been processed,
e.g., by PHP.
This change was delightfully easy to make.
|
|
I added \s* after <body> to match any potential newline (and, for
good measure, whitespace) after <body>. One would usually rather
have this:
<body>
My header
than this:
<body>My header
|
|
This lets the user inject a footer without injecting a header.
|
|
|
|
by arranging the alternatives in the order of their likeliness to
occur.
|
|
Otherwise, I suspect App::Cpan will not be able to install the
module without workarounds on the part of the user.
|
|
|
|
Before, the InjectFoot variable wasn't cleared.
|
|
|
|
|
|
|
|
|
|
|