httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r986921 - in /httpd/httpd/trunk: CHANGES modules/mappers/mod_rewrite.c
Date Wed, 18 Aug 2010 20:35:43 GMT
Author: sf
Date: Wed Aug 18 20:35:43 2010
New Revision: 986921

URL: http://svn.apache.org/viewvc?rev=986921&view=rev
Log:
mod_rewrite: Log errors if rewrite map files cannot be opened

PR: 49639

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=986921&r1=986920&r2=986921&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Aug 18 20:35:43 2010
@@ -6,6 +6,9 @@ Changes with Apache 2.3.7
      mod_dav, mod_cache, mod_session: Fix Handling of requests without a path 
      segment. PR: 49246 [Mark Drayton, Jeff Trawick]
 
+  *) mod_rewrite: Log errors if rewrite map files cannot be opened. PR 49639.
+     [Stefan Fritsch]
+
   *) mod_proxy_http: Support the 'ping' property for backend HTTP/1.1 servers
      via leveraging 100-Continue as the initial "request".
      [Jim Jagielski]

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=986921&r1=986920&r2=986921&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Wed Aug 18 20:35:43 2010
@@ -1205,9 +1205,13 @@ static char *lookup_map_txtfile(request_
     apr_file_t *fp = NULL;
     char line[REWRITE_MAX_TXT_MAP_LINE + 1]; /* +1 for \0 */
     char *value, *keylast;
+    apr_status_t rv;
 
-    if (apr_file_open(&fp, file, APR_READ|APR_BUFFERED, APR_OS_DEFAULT,
-                      r->pool) != APR_SUCCESS) {
+    if ((rv = apr_file_open(&fp, file, APR_READ|APR_BUFFERED, APR_OS_DEFAULT,
+                            r->pool)) != APR_SUCCESS)
+    {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+                      "mod_rewrite: can't open text RewriteMap file %s", file);
         return NULL;
     }
 
@@ -1263,9 +1267,13 @@ static char *lookup_map_dbmfile(request_
     apr_datum_t dbmkey;
     apr_datum_t dbmval;
     char *value;
+    apr_status_t rv;
 
-    if (apr_dbm_open_ex(&dbmfp, dbmtype, file, APR_DBM_READONLY, APR_OS_DEFAULT,
-                        r->pool) != APR_SUCCESS) {
+    if ((rv = apr_dbm_open_ex(&dbmfp, dbmtype, file, APR_DBM_READONLY,
+                              APR_OS_DEFAULT, r->pool)) != APR_SUCCESS)
+    {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+                      "mod_rewrite: can't open DBM RewriteMap %s", file);
         return NULL;
     }
 



Mime
View raw message