-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Julian Foad wrote:
[..]
> I committed the patch (with that fix) in 901797.
> 
> Thanks for the patch.
> 
> Now I am running the test suite on your patch to use
> svn_path_url_add_component2(),
> <http://mail-archives.apache.org/mod_mbox/subversion-dev/200912.mbox/%
> 3c4b2b12ea.5000...@collab.net%3e>, that depends on this one.

Hi Julian,

Assertion failure occurred due to a non-canonical base URL passed to
`svn_path_url_add_component2()'. Despite having canonicalized them
wherever they are generated, the reason for this was that in
`end_element()' of props.c, canonicalization was done where the url was
assigned:

<snip>

 return assign_rsrc_url(pc->rsrc, svn_uri_canonicalize(cdata, pc->pool),
                        pc->pool);

</snip>

But there's one more place(which I missed to notice) where the value of
`cdata'(non-canonical url) is used to assigned the URL, for those
files/dirs who've parent info(cp/mv operations). So the non-canonical
URL was this one and hence the failure.

Attached herewith is the patch which canonicalizes `cdata' where its
initialized as proposed in [1]. Though there's one more place:

<snip>

case ELEM_status:
      /* Parse the <status> tag's CDATA for a status code. */
      if (ne_parse_statusline(cdata, &status))
        return svn_error_create(SVN_ERR_XML_MALFORMED, NULL, NULL);

</snip>

that does not need the canonicalized value, thought its better to do the
canonicalization in just one place.

[[[
Log:
Follow-up r901797. Canonicalization of BASE URL doesn't reflect for
resources having parent info, till now.

* subversion/libsvn_ra_neon/props.c
  (end_element): Canonicalize the BASE URL initially itself in order to
   reflect the same for resources having parent info and otherwise.

Patch by: Kannan R <kann...@collab.net>
]]]

With this, the upgrade to ..add_component2() could be performed(hope),
whose link is also found in [1].

P.S: `make davautocheck` passed :)

[1]-http://mail-archives.apache.org/mod_mbox/subversion-dev/201001.mbox/%3c4b45d651.7060...@collab.net%3e

- --
Thanks & Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBS2r9gnlTqcY7ytmIAQJqbAf/Y+0Zbv1K4bsB/Q5Zv522rR+p/+HV7yoq
aucj91ZydB0yqjcq1Il6v33+14Y7vKcfVVg2RMZ7a0RbMYj04Fx2z5fF+L4JPZel
GoU0YtxIgxR7iwdwkjtjcTIROY9g7tH+SolQdpa9gIXrn3Gk7XQR6LA63z0fHZal
kGrS1dWXR5k/8aXrjGM4Hl3Z6rrgc79PoNqAUNT08VzGWD34Is9xEF14uYGUEr6Z
5vnjDMF3jabV8WOgrU6L39sodGur1BvmaJknMlJJNE7QYbVWXxIsAORsgxV5NMAL
8LKgnmSZjwHgSpD8JTPOJY8LhlN0YjfG7UQFWjSBU3+arluuTDjBDw==
=Uti2
-----END PGP SIGNATURE-----
Index: subversion/libsvn_ra_neon/props.c
===================================================================
--- subversion/libsvn_ra_neon/props.c	(revision 906359)
+++ subversion/libsvn_ra_neon/props.c	(working copy)
@@ -359,7 +359,7 @@
   const elem_defn *parent_defn;
   const elem_defn *defn;
   ne_status status;
-  const char *cdata = pc->cdata->data;
+  const char *cdata = svn_uri_canonicalize(pc->cdata->data, pc->pool);
 
   switch (state)
     {
@@ -413,8 +413,7 @@
     case ELEM_href:
       /* Special handling for <href> that belongs to the <response> tag. */
       if (rsrc->href_parent == ELEM_response)
-        return assign_rsrc_url(pc->rsrc, svn_uri_canonicalize(cdata, pc->pool),
-                               pc->pool);
+        return assign_rsrc_url(pc->rsrc, cdata, pc->pool);
 
       /* Use the parent element's name, not the href. */
       parent_defn = defn_from_id(rsrc->href_parent);

Reply via email to