From d7d7c6a73e974374ee88a425d4cc2a153c3600b7 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sat, 7 Jun 2003 13:09:10 +0000 Subject: [PATCH] mod_rewrite: Perform child initialization on the rewrite log lock. This fixes a log corruption issue when flock-based serialization is used (e.g., FreeBSD). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100187 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ modules/mappers/mod_rewrite.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES b/CHANGES index 14ec0bbbb3..d3c4f8d828 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) mod_rewrite: Perform child initialization on the rewrite log lock. + This fixes a log corruption issue when flock-based serialization + is used (e.g., FreeBSD). [Jeff Trawick] + *) Don't respect the Server header field as set by modules and CGIs. As with 1.3, for proxy requests any such field is from the origin server; otherwise it will have our server info as controlled by diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 0e63f55970..4ef13a2710 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -1072,6 +1072,12 @@ static void init_child(apr_pool_t *p, server_rec *s) } } + rv = apr_global_mutex_child_init(&rewrite_log_lock, NULL, p); + if (rv != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, + "mod_rewrite: could not init rewrite log lock in child"); + } + /* create the lookup cache */ cachep = init_cache(p); } -- 2.50.1