in reply to SSI losing CGI parameters

I've verified that using #exec rather than #include does indeed solve my initial problem. There were a few caveats, but nothing I couldn't solve (though, for what it's worth, I still prefer #include).

Although, now that I have access to my CGI parameters, I'd still like to use them in a POST method (within an SSI). However, Apache refuses to allow a POST operation to a .shtml file. That is, I want the included CGI to serve as a form handler. Apache, however, gives an error 405: resource unavailable.

I understand that this isn't a good implementation, but I'm stuck with a lot of work that's been done on these .shtml's and the various included perl scripts. I'd rather not spend a week cutting and pasting code so that I have a true .pl script when it seem's like Apache should understand that a .shtml file can in fact handle a POST.

So a question remains. How can I convince Apache to accept that an SSI is a valid POST target? I've scoured the web, but all I've been able to find is others with the same problem.

Replies are listed 'Best First'.
Re: Re: SSI losing CGI parameters
by dws (Chancellor) on Jan 26, 2001 at 10:29 UTC
    If you really, really want Apache to allow POSTs to .shtml files to pass through to SSI-embedded CGI scripts, then you still have two options left open:
    1. Do it yourself. Download an Apache source tarball, and start hacking on the source until it works the way you want it to. Depending on your C skills, this might take 1-10 days.

    2. Pay someone else to do it. If you're unable or unwilling to hack Apache source yourself, consider sponsoring a project at Collab.net. Someone might take up the challenge for a few thousand dollars.

    If you're willing to retreat a bit on your desire to have Apache do something that it doesn't do out-of-the-box, then you have a third option -- one hinted at in at least one reply above: Modify your CGI scripts. Before creating a CGI object, force-feed %ENV with the variables that CGI.pm expects to find. You'll find what you need in the enviroment.