You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Robert S. Thau" <rs...@ai.mit.edu> on 1995/08/12 18:37:44 UTC
compatibility fix...
This makes <!--#exec cgi=""--> treat the named item as a CGI script
regardless of the content_type it would be assigned under normal
rules. I'm a bit uncomfortable with this --- people outside can see
the code of these scripts just by asking for it *without* going
through the includes machinery --- but it is one of the most
frequently reported bugs we've got, and it is a compatibility problem
for a lot of people.
It might be better to have some kind of option which just didn't run
these things at all, but we're fresh out of option bits...
*** mod_include.c Sat Aug 12 10:42:04 1995
--- ../mod_include.c Sat Aug 12 11:19:31 1995
***************
*** 341,346 ****
--- 341,354 ----
rr->path_info = r->path_info; /* painful to get right; see mod_cgi.c */
rr->args = r->args;
+ /* Force sub_req to be treated as a CGI request, even if ordinary
+ * typing rules would have called it something else.
+ */
+
+ rr->content_type = CGI_MAGIC_TYPE;
+
+ /* Run it. */
+
if (run_sub_req (rr) == REDIRECT) {
char *location = table_get (rr->headers_out, "Location");
rprintf(r,"<A HREF=\"%s\">%s</A>",location,location);
Re: compatibility fix...
Posted by Brian Behlendorf <br...@organic.com>.
On Sat, 12 Aug 1995, Robert S. Thau wrote:
> It might be better to have some kind of option which just didn't run
> these things at all, but we're fresh out of option bits...
-DNCSABACKWARDS :)
Brian
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/