subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1397296 - /subversion/trunk/subversion/libsvn_ra_serf/xml.c
Date Thu, 11 Oct 2012 20:42:58 GMT
Author: cmpilato
Date: Thu Oct 11 20:42:58 2012
New Revision: 1397296

URL: http://svn.apache.org/viewvc?rev=1397296&view=rev
Log:
On the 'http-dynamic-prop-namespaces' branch: fix the way we build out
the extended property namespace URIs to avoid assertions.

* subversion/mod_dav_svn/deadprops.c
  (propname_to_davname): Use apr_pstrcat() and svn_path_uri_encode()
    rather than svn_path_url_add_component2() because the namespace
    base URI isn't canonical (it has a trailing slash) and we don't
    need (or really want) to run this thing through canonicalization
    routines -- to us, it's just a string with a known, fixed prefix.
  (davname_to_propname): Use svn_path_url_decode on a string splice
    (of sorts) rather than invoking the very picky svn_uri_* APIs.

* subversion/libsvn_ra_serf/property.c
  (svn_ra_serf__wirename_from_svnname, svn_ra_serf__svnname_from_wirename):
    Do the same things here.


Modified:
    subversion/trunk/subversion/libsvn_ra_serf/xml.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/xml.c?rev=1397296&r1=1397295&r2=1397296&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/xml.c Thu Oct 11 20:42:58 2012
@@ -205,9 +205,23 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_
             }
         }
     }
+  else
+    {
+      const svn_ra_serf__ns_t *ns;
+
+      for (ns = ns_list; ns; ns = ns->next)
+        {
+          if (! ns->namespace[0])
+            {
+              returned_prop_name->namespace = ns->url;
+              returned_prop_name->name = name;
+              return;
+            }
+        }
+    }    
 
-  /* If there is no prefix, or if the prefix is not found, then the
-     name is NOT within a namespace.  */
+  /* If the prefix is not found, then the name is NOT within a
+     namespace.  */
   returned_prop_name->namespace = "";
   returned_prop_name->name = name;
 }



Mime
View raw message