From: Jeff Trawick Date: Sat, 7 Jun 2003 13:09:10 +0000 (+0000) Subject: mod_rewrite: Perform child initialization on the rewrite log lock. X-Git-Tag: pre_ajp_proxy~1559 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7d7c6a73e974374ee88a425d4cc2a153c3600b7;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/CHANGES b/CHANGES index 14ec0bbbb3b..d3c4f8d8288 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 0e63f559706..4ef13a27108 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); }