httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r792910 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/mappers/mod_rewrite.c
Date Fri, 10 Jul 2009 12:20:46 GMT
Author: jim
Date: Fri Jul 10 12:20:45 2009
New Revision: 792910

URL: http://svn.apache.org/viewvc?rev=792910&view=rev
Log:
remove locking for writing in mod_rewrite
PR 46942

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=792910&r1=792909&r2=792910&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Fri Jul 10 12:20:45 2009
@@ -27,6 +27,9 @@
      different security issues which may affect particular configurations
      and third-party modules.
 
+  *) mod_rewrite: Remove locking for writing to the rewritelog.
+     PR 46942
+
   *) mod_alias: Ensure Redirect emits HTTP-compliant URLs.
      PR 44020
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=792910&r1=792909&r2=792910&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Fri Jul 10 12:20:45 2009
@@ -101,12 +101,6 @@
    +1: niq, rpluem, jim
    +0; [Would be +1 once ProxyRemote behavior is verified/fixed]
 
- * mod_rewrite: Remove locking for writing to the rewritelog.
-   PR 46942
-   trunk patch: http://svn.apache.org/viewvc?view=rev&revision=783734
-   2.2.x patch: http://people.apache.org/~niq/patches/46942.patch
-   +1: niq, rpluem, jim
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c?rev=792910&r1=792909&r2=792910&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c Fri Jul 10 12:20:45 2009
@@ -374,10 +374,6 @@
 static const char *lockname;
 static apr_global_mutex_t *rewrite_mapr_lock_acquire = NULL;
 
-#ifndef REWRITELOG_DISABLED
-static apr_global_mutex_t *rewrite_log_lock = NULL;
-#endif
-
 /* Optional functions imported from mod_ssl when loaded: */
 static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *rewrite_ssl_lookup = NULL;
 static APR_OPTIONAL_FN_TYPE(ssl_is_https) *rewrite_is_https = NULL;
@@ -474,7 +470,6 @@
     const char *rhost, *rname;
     apr_size_t nbytes;
     int redir;
-    apr_status_t rv;
     request_rec *req;
     va_list ap;
 
@@ -514,23 +509,9 @@
                            perdir ? "] ": "",
                            text);
 
-    rv = apr_global_mutex_lock(rewrite_log_lock);
-    if (rv != APR_SUCCESS) {
-        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
-                      "apr_global_mutex_lock(rewrite_log_lock) failed");
-        /* XXX: Maybe this should be fatal? */
-    }
-
     nbytes = strlen(logline);
     apr_file_write(conf->rewritelogfp, logline, &nbytes);
 
-    rv = apr_global_mutex_unlock(rewrite_log_lock);
-    if (rv != APR_SUCCESS) {
-        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
-                      "apr_global_mutex_unlock(rewrite_log_lock) failed");
-        /* XXX: Maybe this should be fatal? */
-    }
-
     return;
 }
 #endif /* !REWRITELOG_DISABLED */
@@ -4164,26 +4145,6 @@
     /* check if proxy module is available */
     proxy_available = (ap_find_linked_module("mod_proxy.c") != NULL);
 
-#ifndef REWRITELOG_DISABLED
-    /* create the rewriting lockfiles in the parent */
-    if ((rv = apr_global_mutex_create(&rewrite_log_lock, NULL,
-                                      APR_LOCK_DEFAULT, p)) != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
-                     "mod_rewrite: could not create rewrite_log_lock");
-        return HTTP_INTERNAL_SERVER_ERROR;
-    }
-
-#ifdef AP_NEED_SET_MUTEX_PERMS
-    rv = unixd_set_global_mutex_perms(rewrite_log_lock);
-    if (rv != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
-                     "mod_rewrite: Could not set permissions on "
-                     "rewrite_log_lock; check User and Group directives");
-        return HTTP_INTERNAL_SERVER_ERROR;
-    }
-#endif /* perms */
-#endif /* rewritelog */
-
     rv = rewritelock_create(s, p);
     if (rv != APR_SUCCESS) {
         return HTTP_INTERNAL_SERVER_ERROR;
@@ -4230,14 +4191,6 @@
         }
     }
 
-#ifndef REWRITELOG_DISABLED
-    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");
-    }
-#endif
-
     /* create the lookup cache */
     if (!init_cache(p)) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,



Mime
View raw message