Variation of mod_include -- pointers?

This is a discussion on Variation of mod_include -- pointers? within the Linux Web Servers forums, part of the Web Server and Related Forums category; Dear Apache Module Experts, I would like to write an Apache module that is variation of 'mod_include'. For SSI, mod_include ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #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.
  #2 (permalink)  
Old 06-19-2004
Nick Kew
 
Posts: n/a
Default Re: Variation of mod_include -- pointers?

In article <2jip4jF10qf6jU1@uni-berlin.de>,
William Park <opengeometry@yahoo.ca> writes:

> 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.


That's simple enough. But also very inefficient.


> Background:


That's more helpful.

> I'm trying to write "mod_bash" where the embedded code is
> shell script,


The easy way to do that would be either to use CGI or to hook it in
with mod_ext_filter. I think hooking bash in in the manner of
mod_perl or mod_python would be a rather big job.

--
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/
  #3 (permalink)  
Old 06-20-2004
William Park
 
Posts: n/a
Default Re: Variation of mod_include -- pointers?

Nick Kew <nick@hugin.webthing.com> wrote:
> In article <2jip4jF10qf6jU1@uni-berlin.de>,
> William Park <opengeometry@yahoo.ca> writes:
>
> > 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.

>
> That's simple enough. But also very inefficient.
>
>
> > Background:

>
> That's more helpful.
>
> > I'm trying to write "mod_bash" where the embedded code is
> > shell script,

>
> The easy way to do that would be either to use CGI or to hook it in
> with mod_ext_filter. I think hooking bash in in the manner of
> mod_perl or mod_python would be a rather big job.


Yes, CGI (with PATH_INFO) was my first thought, but I'm looking for a
way to reduce the 2-step to just one. I'll see what I can steal from
mod_cgi or mod_ext_filter.

My command line solution for HTML template can be found at
http://freshmeat.net/projects/basp/
which I've named it Bash Active Server Pages (BASP) for now. :-)

--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
No, I will not fix your computer! I'll reformat your harddisk, though.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0