Return-Path: Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 53585 invoked by uid 500); 25 Aug 2001 05:32:11 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Received: (qmail 53582 invoked from network); 25 Aug 2001 05:32:11 -0000 Received: from h32.sny.collab.net (HELO icarus.apache.org) (64.208.42.42) by h31.sny.collab.net with SMTP; 25 Aug 2001 05:32:11 -0000 Received: (qmail 65353 invoked by uid 1092); 25 Aug 2001 05:26:05 -0000 Date: 25 Aug 2001 05:26:05 -0000 Message-ID: <20010825052605.65352.qmail@icarus.apache.org> From: rbb@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/filters mod_include.c X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Status: O X-Status: X-Keywords: X-UID: 517 rbb 01/08/24 22:26:05 Modified: . CHANGES modules/filters mod_include.c Log: Add the ability for mod_include to add the INCLUDES filter if the file is configured for the server-parsed handler. This makes the configuration for .shtml files much easier to understand, and allows mod_include to honor Apache 1.3 config files. Based on Doug MacEachern's patch to PHP to do the same thing. Revision Changes Path 1.328 +7 -0 httpd-2.0/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/httpd-2.0/CHANGES,v retrieving revision 1.327 retrieving revision 1.328 diff -u -r1.327 -r1.328 --- CHANGES 2001/08/24 23:25:14 1.327 +++ CHANGES 2001/08/25 05:26:04 1.328 @@ -1,5 +1,12 @@ Changes with Apache 2.0.25-dev + *) Add the ability for mod_include to add the INCLUDES filter + if the file is configured for the server-parsed handler. + This makes the configuration for .shtml files much easier + to understand, and allows mod_include to honor Apache 1.3 + config files. Based on Doug MacEachern's patch to PHP + to do the same thing. [Ryan Bloom] + *) force OpenSSL to ignore process local-caching and to always get/set/delete sessions using mod_ssl's callbacks [Madhusudan Mathihalli , 1.133 +10 -0 httpd-2.0/modules/filters/mod_include.c Index: mod_include.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -r1.132 -r1.133 --- mod_include.c 2001/08/24 06:47:35 1.132 +++ mod_include.c 2001/08/25 05:26:05 1.133 @@ -2894,6 +2894,15 @@ #endif } +static void insert_filter(request_rec *r) +{ + if (r->handler && (strcmp(r->handler, "server-parsed") == 0)) { + ap_add_output_filter("INCLUDES", NULL, r, r->connection); + r->content_type = "text/html"; + r->handler = "default-handler"; + } +} + static void register_hooks(apr_pool_t *p) { APR_REGISTER_OPTIONAL_FN(ap_ssi_get_tag_and_value); @@ -2901,6 +2910,7 @@ APR_REGISTER_OPTIONAL_FN(ap_register_include_handler); ap_hook_post_config(include_post_config, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_handler(xbithack_handler, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_insert_filter(insert_filter, NULL, NULL, APR_HOOK_MIDDLE); ap_register_output_filter("INCLUDES", includes_filter, AP_FTYPE_CONTENT); }