[EMAIL PROTECTED] (Bill) wrote:
>Hi,
>
>I'm scratching my head on a mod_perl problem, and I found out you guided other
>programmers in my situation...
>
>here's the context:
>
>[ 1999-09-30 4:20:30 ]
>> Is there a way too, to have output of NON PERL cgi scripts to be SSI parsed?
>
>Not that I know of, without going through some serious hoops.
>
>[ 1999-06-28 14:16:28 ]
>One thing on my to-do list is to let Apache::SSI take a run-time directive
that
>would let you do exactly as you say - use LWP to fetch the contents of the
>page, then filter its output.  This would be considerably slower, but it would
>get the job done.
>
>
>
>now, i have the exact same problem: i need my SSI to filter thru everithing:
>HTML, CGIs, PHP, etc.
>
>my idea (still unclear) was to:
>1- steal STDOUT, by redirecting it, from fixup stage
>2- let the request be handled normally
>3- filter the buffered output and send it
>
>if filtering can be done in on-the-fly, this wouldn't degrade performance too
>much and avoid the initial delay.
>
>
>this being said, here's what i'm wondering:
>
>have the problem been solved already?
>
>if not, does the STDOUT filter sound possible?
>
>
>thanks for your time and interest,
>
>Billy Nadeau
>

I'm forwarding your message to the list also, since it seems like something of
general interest.  Hope that's okay.

I don't know of any solution that will take care of all files at once.  I think
you'll have to either invent one, or deal with the seperate types of content
individually.  I think both could be done.

If you have enough scripts & pages that you don't want to spend time putting a
small modification into all of them, then I don't know of any way to do what
you want to do except to actually re-request the document using LWP, and then
parse its output with Apache::SSI.  

I don't think there's any way to catch the output of an actual CGI script
(mod_cgi) by redirecting STDOUT.  You'd have to modify the script to parse its
own output, which could be a very small modification if you abstracted the code
into a module.

Come to think of it, it might be handy if a programmer could type

  use Apache::SSI qw(parse_my_output);

at the top of a CGI script and the output would magically be parsed for SSI. 
Hmmm...

I'm not promising anything right now though - the main obstacle is that
Apache::SSI is meant to run under mod_perl, and getting full functionality
under mod_cgi is no trivial task.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

Reply via email to