httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1476644 - in /httpd/httpd/trunk: CHANGES modules/dav/fs/dbm.c
Date Sat, 27 Apr 2013 17:44:36 GMT
Author: minfrin
Date: Sat Apr 27 17:44:36 2013
New Revision: 1476644

URL: http://svn.apache.org/r1476644
Log:
mod_dav: Do not fail PROPPATCH when prop namespace is not known. PR 52559
Submitted by: Diego Santa Cruz <diego.santaCruz spinetix.com>
Tested by William Lewis <wiml omnigroup com>

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/dav/fs/dbm.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1476644&r1=1476643&r2=1476644&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sat Apr 27 17:44:36 2013
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_dav: Do not fail PROPPATCH when prop namespace is not known.
+     PR 52559 [Diego Santa Cruz <diego.santaCruz spinetix.com>]
+
   *) mod_dav: When a PROPPATCH attempts to remove a non-existent dead
      property on a resource for which there is no dead property in the same
      namespace httpd segfaults. PR 52559 [Diego Santa Cruz

Modified: httpd/httpd/trunk/modules/dav/fs/dbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/fs/dbm.c?rev=1476644&r1=1476643&r2=1476644&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/fs/dbm.c (original)
+++ httpd/httpd/trunk/modules/dav/fs/dbm.c Sat Apr 27 17:44:36 2013
@@ -191,7 +191,15 @@ void dav_dbm_close(dav_db *db)
 
 dav_error * dav_dbm_fetch(dav_db *db, apr_datum_t key, apr_datum_t *pvalue)
 {
-    apr_status_t status = apr_dbm_fetch(db->file, key, pvalue);
+    apr_status_t status;
+
+    if (!key.dptr) {
+        /* no key could be created (namespace not known) => no value */
+        memset(pvalue, 0, sizeof(*pvalue));
+        status = APR_SUCCESS;
+    } else {
+        status = apr_dbm_fetch(db->file, key, pvalue);
+    }
 
     return dav_fs_dbm_error(db, NULL, status);
 }



Mime
View raw message