Seldo wrote:
Whoa, quick turnaround! Oof course, it's 11pm here, but only 6pm where
you are I suppose...
It's actually 11am, on your tomorrow (PDT+11) ;) I'm living in the future ;)

On 05 February 2003, Stas Bekman wrote:
SB> You forgot to add to unfortunate facts that both mod_perl 2.0 and
SB> Apache 2.0 are new and may have bugs ;)

From what I could tell, doing this with Apache 1.3 is even more
daunting, since it didn't really have the concept of filters ironed
out.
True.

[...]
SB> Assuming that you have a set of filters which do the work, it's
SB> easy. e.g. I think php in 2.0 is an output filter, so you should
SB> just dynamically insert the php filter when you figure out that
SB> the content is php. HTML/text is easy. SSI is a filter, so covered
SB> too. What other processors do you need?

That's the thing. This application has to be flexible: I don't want to
have to explicitly support file types; I simply want to supply the
server with data that looks like a file and have it treat that data
exactly as it would any other file.
The simplest way would be to save the extracted data into a file, and set $r->filename to point to that file, and let the Apache core handle that. If you want it to be smarter, but more complex, read on.

However, I have a feeling this might be impractical, so alternate
suggestions are welcome :-) At this point I feel I should be doing
some kind of I-am-a-clueless-newbie dance. I am totally out of my
depth, and this project is due in 3 weeks! *bursts into semi-panicked
laughter*. Um. Yeah :-)
Well, we are all new to this thing so *you* are the one who has to be the inventor.

In short, if all possible applications can be invoked as filters you should be all set.

text/html: just send it out
text/plain: ditto

mod_perl: compile the handler (assuming that the code is coming from the db) and configure the handler to be modperl/perl-script or set the PerlResponseHandler to the one you've just compiled

exe: save the data in a file, and set $r->filename to it. Apache will do the rest.

php: though I haven't tried it, the php filter probably accepts its code as an input to a filter. you have to check that though.




__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to