Skip to content

Commit 2b6596f

Browse files
committed
Port over some fixes to mod_dav 1.0 so that the Apache 2.0 DAV code
will pass the "litmus" DAV test tool. In particular, we need to properly handle empty namespaces properly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94482 13f79535-47bb-0310-9956-ffa450edef68
1 parent d89e2ca commit 2b6596f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

modules/dav/fs/dbm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,13 @@ static dav_error * dav_propdb_define_namespaces(dav_db *db, dav_xmlns_info *xi)
544544
/* within the prop values, we use "ns%d" for prefixes... register them */
545545
for (ns = 0; ns < db->ns_count; ++ns, uri += strlen(uri) + 1) {
546546

547+
/* Empty URIs signify the empty namespace. These do not get a
548+
namespace prefix. when we generate the value, we will simply
549+
leave off the prefix, which is defined by mod_dav to be the
550+
empty namespace. */
551+
if (*uri == '\0')
552+
continue;
553+
547554
/* ns_table.buf can move, so copy its value (we want the values to
548555
last as long as the provided dav_xmlns_info). */
549556
dav_xmlns_add(xi,

0 commit comments

Comments
 (0)