-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Julian Foad wrote: [..] > It would be great if you could trace the calls back to wherever the > non-canonical paths are generated, and fix them at that point.
Thank you Julian, for the comments. Attached herewith is the patch to canonicalize the URLs. If this seems fine, I shall send the patch to upgrade ..add_component() to ..add_component2(). [[[ Log: Ensure the URLs are canonical before passing to the new `svn_path_url_add_component2()'. [ in subversion/libsvn_ra_neon ] * commit.c (checkout_resource): Canonicalize the 'BASE' as `svn_path_url_add_component2()' won't handle it. * props.c (svn_ra_neon__get_baseline_info, svn_ra_neon__get_one_prop): Same. * options.c (svn_ra_neon__exchange_capabilities): Same. Found by: stsp Suggested by: stsp,julianfoad Patch by: Kannan R <kann...@collab.net> ]]] - -- Thanks & Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSynPbHlTqcY7ytmIAQJf7QgAoHk0HePERuKpKd9fwV93r2S7818zRx9U 4RIsHab++HGX7G4JKv3xp0nL+yqP2nHeCV9Gmfxr3vDppgxGFzsFyQf14WGTNFsK rX0V9p7Mis2uqcRPon8+DFeBKikG9PHSFkhKiiDhTTIlQ2re7+ZVHjPyTlLDf4W6 szs5Kw9YzZrVjdPifB1sOD9tuAxTwiTgpqJGHiEnmV6DWKi73mjMOYPYpEGuV+6o 1xg3nv6sEUxJBmehFhnEY6/HS0WKVMgXGuXEYUD60iVDbhcWoRzXGboVMa7IEKFt pve8hYvUrR9fGToT3V7FvIFk6SQ6tt7tYfqoUR5PmN2yiPbypc+l1A== =PAQw -----END PGP SIGNATURE-----
Index: subversion/libsvn_ra_neon/commit.c =================================================================== --- subversion/libsvn_ra_neon/commit.c (revision 890793) +++ subversion/libsvn_ra_neon/commit.c (working copy) @@ -518,7 +518,7 @@ _("Unable to parse URL '%s'"), locn); } - rsrc->wr_url = apr_pstrdup(rsrc->pool, parse.path); + rsrc->wr_url = svn_uri_canonicalize(parse.path, rsrc->pool); ne_uri_free(&parse); return SVN_NO_ERROR; Index: subversion/libsvn_ra_neon/props.c =================================================================== --- subversion/libsvn_ra_neon/props.c (revision 890793) +++ subversion/libsvn_ra_neon/props.c (working copy) @@ -619,6 +619,7 @@ ne_propname props[2] = { { 0 } }; const char *name; const svn_string_t *value; + svn_string_t *canonicalized_baseline_url; props[0] = *propname; SVN_ERR(svn_ra_neon__get_props_resource(&rsrc, sess, url, label, props, @@ -634,7 +635,12 @@ name, url); } - *propval = value; + canonicalized_baseline_url = svn_string_create(svn_uri_canonicalize + (value->data, + pool), + pool); + + *propval = canonicalized_baseline_url; return SVN_NO_ERROR; } @@ -959,7 +965,7 @@ { svn_ra_neon__resource_t *baseline_rsrc, *rsrc; const svn_string_t *my_bc_url; - svn_string_t my_bc_rel; + svn_string_t my_bc_rel, *canonicalized_bc_url; /* Go fetch a BASELINE_RSRC that contains specific properties we want. This routine will also fill in BC_RELATIVE as best it @@ -989,9 +995,12 @@ "on the baseline resource")); } + canonicalized_bc_url = svn_string_create(svn_uri_canonicalize(my_bc_url->data, + pool), pool); + /* maybe return bc_url to the caller */ if (bc_url) - *bc_url = *my_bc_url; + *bc_url = *canonicalized_bc_url; if (latest_rev != NULL) { Index: subversion/libsvn_ra_neon/options.c =================================================================== --- subversion/libsvn_ra_neon/options.c (revision 890793) +++ subversion/libsvn_ra_neon/options.c (working copy) @@ -294,7 +294,7 @@ goto cleanup; } - ras->act_coll = apr_pstrdup(ras->pool, oc.activity_coll->data); + ras->act_coll = svn_uri_canonicalize(oc.activity_coll->data, ras->pool); parse_capabilities(req->ne_req, ras, pool); cleanup: