httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject <!--#exec cgi=""--> compatibility fix...
Date Sat, 12 Aug 1995 12:37:44 GMT
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);


Mime
View raw message