You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2013/05/26 21:58:20 UTC

svn commit: r1486459 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/dav/fs/dbm.c

Author: minfrin
Date: Sun May 26 19:58:20 2013
New Revision: 1486459

URL: http://svn.apache.org/r1486459
Log:
mod_dav: Do not fail PROPPATCH when prop namespace is not known. PR 52559

trunk patch: http://svn.apache.org/r1476644
Submitted by: Diego Santa Cruz <diego.santaCruz spinetix.com>
Reviewed by: minfrin, jim, jorton

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/dav/fs/dbm.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1476644

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1486459&r1=1486458&r2=1486459&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Sun May 26 19:58:20 2013
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.5
 
+  *) 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/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1486459&r1=1486458&r2=1486459&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun May 26 19:58:20 2013
@@ -90,11 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
   
-    * mod_dav: Do not fail PROPPATCH when prop namespace is not known. PR 52559
-      trunk patch: http://svn.apache.org/r1476644
-      2.4.x patch: trunk patch works (minus CHANGES)
-      +1: minfrin, jim, jorton
-
     * mod_dav: Sending a MERGE request against a URI handled by mod_dav_svn with
       the source href (sent as part of the request body as XML) pointing to a
       URI that is not configured for DAV will trigger a segfault.

Modified: httpd/httpd/branches/2.4.x/modules/dav/fs/dbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/fs/dbm.c?rev=1486459&r1=1486458&r2=1486459&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/fs/dbm.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/fs/dbm.c Sun May 26 19:58:20 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);
 }