You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@hyperreal.com> on 1995/08/09 20:33:31 UTC

nested include patch [hagberg@aux.med.cornell.edu] (fwd)

(eric - should I add "hagberg@aux.med.cornell.edu" to the list of 
approved posters?)

---------- Forwarded message ----------
From: hagberg@aux.med.cornell.edu
Date: Wed, 9 Aug 1995 13:44:23 -0400 (EDT)
To: new-httpd@hyperreal.com
Subject: nested include patch

Here's the patch:

*** mod_include.c	Mon Jul 31 20:47:02 1995
--- mod_include.c.new	Wed Aug  9 13:40:17 1995
***************
*** 790,799 ****
  	pfclose (r->pool, f);
  	return OK;
      }
!     
      add_common_vars (r);
      add_include_vars (r, DEFAULT_TIME_FORMAT);
! 
      send_parsed_content (f, r);
      
      kill_timeout (r);
--- 798,817 ----
  	pfclose (r->pool, f);
  	return OK;
      }
!    
! if (r->main) {
!       /* Kludge --- for nested includes, we want to keep the
!        * subprocess environment of the base document (for compatibility);
!        * that means torquing our own last_modified date as well so that
!        * the LAST_MODIFIED variable gets reset to the proper value if
!        * the nested document resets <!--#config timefmt-->
!        */
!       r->subprocess_env = r->main->subprocess_env;
!       r->finfo.st_mtime= r->main->finfo.st_mtime;
! } else { 
      add_common_vars (r);
      add_include_vars (r, DEFAULT_TIME_FORMAT);
! }
      send_parsed_content (f, r);
      
      kill_timeout (r);