[Micronet] Apache 2.2 with mod_substitute and SSI

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Micronet] Apache 2.2 with mod_substitute and SSI

Graham Patterson

Does anyone have any experience mixing mod_substitute with SSI
directives? I have replacement occurring before Includes are processed,
but the SSI directive is retained in the resulting page as well as being
replaced, rather than being just replaced.

For example:

Friday, 24-May-2013 13:25:12 PDT<!--#echo var="DATE_LOCAL" -->

I am doing the output filtering with

AddOutputFilterByType SUBSTITUTE;INCLUDES text/html

and for the purposes of example, the substitution for the above is

Substitute "s|</body|<!--#echo var=\"DATE_LOCAL\" --></body|"


I know it is an odd thing to do, but I have reasons.


Graham

--
Graham Patterson, Systems Administrator
Lawrence Hall of Science, UC Berkeley   510-643-2222
"...past the iguana, the tyrannosaurus, the mastodon, the mathematical
puzzles, and the meteorite..." - directions to my office.

 
-------------------------------------------------------------------------
The following was automatically added to this message by the list server:

To learn more about Micronet, including how to subscribe to or unsubscribe from its mailing list and how to find out about upcoming meetings, please visit the Micronet Web site:

http://micronet.berkeley.edu

Messages you send to this mailing list are public and world-viewable, and the list's archives can be browsed and searched on the Internet.  This means these messages can be viewed by (among others) your bosses, prospective employers, and people who have known you in the past.
Reply | Threaded
Open this post in threaded view
|

[Micronet] Followup: Apache 2.2 with mod_substitute and SSI

Graham Patterson
It looks like it is just Apache 2.2 having issues with
AddOutputFilterByType. The original code ought to work on Apache 2.4.

This works on Apache 2.2:
FilterDeclare MYSUB
FilterProvider MYSUB SUBSTITUTE resp=Content-Type $text/html
FilterDeclare MYINC
FilterProvider MYINC INCLUDES resp=Content-Type $text/html
FilterChain +MYSUB +MYINC

using the same substitution example. If I read it right 2.4 changes the
FilterProvider syntax, which makes this version obsolescent 8-)


But it takes my mind of Java and browser patching!


Graham


On 5/24/13 1:33 PM, Graham Patterson wrote:

>
> Does anyone have any experience mixing mod_substitute with SSI
> directives? I have replacement occurring before Includes are processed,
> but the SSI directive is retained in the resulting page as well as being
> replaced, rather than being just replaced.
>
> For example:
>
> Friday, 24-May-2013 13:25:12 PDT<!--#echo var="DATE_LOCAL" -->
>
> I am doing the output filtering with
>
> AddOutputFilterByType SUBSTITUTE;INCLUDES text/html
>
> and for the purposes of example, the substitution for the above is
>
> Substitute "s|</body|<!--#echo var=\"DATE_LOCAL\" --></body|"
>
>
> I know it is an odd thing to do, but I have reasons.
>
>
> Graham
>


--
Graham Patterson, Systems Administrator
Lawrence Hall of Science, UC Berkeley   510-643-2222
"...past the iguana, the tyrannosaurus, the mastodon, the mathematical
puzzles, and the meteorite..." - directions to my office.

 
-------------------------------------------------------------------------
The following was automatically added to this message by the list server:

To learn more about Micronet, including how to subscribe to or unsubscribe from its mailing list and how to find out about upcoming meetings, please visit the Micronet Web site:

http://micronet.berkeley.edu

Messages you send to this mailing list are public and world-viewable, and the list's archives can be browsed and searched on the Internet.  This means these messages can be viewed by (among others) your bosses, prospective employers, and people who have known you in the past.