On Mon, Aug 11, 2003 at 08:37:19AM -0700, Coexec wrote: > The end user will submit a form. One of the values in > that form will be a path on the local web server. So > in the return of the CGI, I want to include the > results of Apache's autoindex. I cannot figure out > how to do it. If I could pass a variable from a CGI > to an SSI, the problem would be solved, but I do not > believe that it is possible. I have been looking at > Apache::SSI and Apache::AutoIndex but I don't think I > can get them to do what I need. Does anyone have any > suggestions or recommendations?
You could probably issue a subrequest in a CGI program running under Apache::Registry, though I'm unsure how to go about capturing the output of a subrequest. However, it would probably be easier to use Apache::Filter with your own Perl handler: PerlModule Apache::Filter PerlModule Apache::Icon PerlModule Apache::AutoIndex PerlModule Apache::MyHandler <Location /addindex> PerlSetVar Filter On SetHandler perl-script PerlTransHandler Apache::AutoIndex::transhandler PerlHandler Apache::AutoIndex Apache::MyHandler </Location> Then your handler can take the output of Apache::AutoIndex and do whatever it likes to it in the same manner as Apache::SSI. The perldoc for Apache::Filter shows you just how to do this. -chris