From 56186138d6a48d77f0bc28dffbda29803fcd3cc9 Mon Sep 17 00:00:00 2001 From: Greg Stein Date: Sat, 6 Apr 2002 00:19:19 +0000 Subject: [PATCH] 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 --- modules/dav/fs/dbm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/dav/fs/dbm.c b/modules/dav/fs/dbm.c index 45cd710c6a..f9abf745dc 100644 --- a/modules/dav/fs/dbm.c +++ b/modules/dav/fs/dbm.c @@ -544,6 +544,13 @@ static dav_error * dav_propdb_define_namespaces(dav_db *db, dav_xmlns_info *xi) /* within the prop values, we use "ns%d" for prefixes... register them */ for (ns = 0; ns < db->ns_count; ++ns, uri += strlen(uri) + 1) { + /* Empty URIs signify the empty namespace. These do not get a + namespace prefix. when we generate the value, we will simply + leave off the prefix, which is defined by mod_dav to be the + empty namespace. */ + if (*uri == '\0') + continue; + /* ns_table.buf can move, so copy its value (we want the values to last as long as the provided dav_xmlns_info). */ dav_xmlns_add(xi, -- 2.40.0