Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 72149 invoked by uid 500); 28 Jul 2003 15:32:31 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 72088 invoked by uid 500); 28 Jul 2003 15:32:30 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 28 Jul 2003 15:32:29 -0000 Message-ID: <20030728153229.97799.qmail@icarus.apache.org> From: nd@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/mappers mod_rewrite.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N nd 2003/07/28 08:32:28 Modified: . CHANGES modules/mappers mod_rewrite.c Log: allow piped rewrite logs to be relative to serverroot Revision Changes Path 1.1240 +3 -0 httpd-2.0/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/httpd-2.0/CHANGES,v retrieving revision 1.1239 retrieving revision 1.1240 diff -u -r1.1239 -r1.1240 --- CHANGES 28 Jul 2003 02:09:27 -0000 1.1239 +++ CHANGES 28 Jul 2003 15:32:25 -0000 1.1240 @@ -2,6 +2,9 @@ [Remove entries to the current 2.0 section below, when backported] + *) mod_rewrite: Allow piped rewrite logs to be relative to ServerRoot. + [Andr� Malo] + *) mod_ssl: Fix segfaults after renegotiation failure. PR 21370 [Hartmut Keil ] 1.192 +15 -4 httpd-2.0/modules/mappers/mod_rewrite.c Index: mod_rewrite.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v retrieving revision 1.191 retrieving revision 1.192 diff -u -r1.191 -r1.192 --- mod_rewrite.c 28 Jul 2003 14:53:32 -0000 1.191 +++ mod_rewrite.c 28 Jul 2003 15:32:27 -0000 1.192 @@ -385,8 +385,6 @@ { rewrite_server_conf *conf; const char *fname; - apr_status_t rc; - piped_log *pl; conf = ap_get_module_config(s->module_config, &rewrite_module); @@ -399,15 +397,27 @@ } if (*conf->rewritelogfile == '|') { - if ((pl = ap_open_piped_log(p, conf->rewritelogfile+1)) == NULL) { + piped_log *pl; + + fname = ap_server_root_relative(p, conf->rewritelogfile+1); + if (!fname) { + ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s, + "mod_rewrite: Invalid RewriteLog " + "path %s", conf->rewritelogfile+1); + return 0; + } + + if ((pl = ap_open_piped_log(p, fname)) == NULL) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_rewrite: could not open reliable pipe " - "to RewriteLog filter %s", conf->rewritelogfile+1); + "to RewriteLog filter %s", fname); return 0; } conf->rewritelogfp = ap_piped_log_write_fd(pl); } else { + apr_status_t rc; + fname = ap_server_root_relative(p, conf->rewritelogfile); if (!fname) { ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s, @@ -415,6 +425,7 @@ "path %s", conf->rewritelogfile); return 0; } + if ((rc = apr_file_open(&conf->rewritelogfp, fname, REWRITELOG_FLAGS, REWRITELOG_MODE, p)) != APR_SUCCESS) {