View Single Post

  #1 (permalink)  
Old 06-19-2004
William Park
 
Posts: n/a
Default Variation of mod_include -- pointers?


Dear Apache Module Experts,

I would like to write an Apache module that is variation of
'mod_include'. For SSI, mod_include parses the file, extracts code
segments, execute them, and send the results (along with non-code text)
back to client.

Does anyone have pointers (examples, docs, anything) on how to
- get the entire content of file as single string, and
- give a replacement string back to Apache to send to client.
?

Background:
I'm trying to write "mod_bash" where the embedded code is
shell script, instead of PHP, Java (JSP), or MS-Basic (ASP).
Right now, I can do the whole thing from command line. But,
obviously, I have to do this from Apache inside.

Yours truly,
--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
No, I will not fix your computer! I'll reformat your harddisk, though.