On Mon, Nov 30, 2009 at 08:28:19PM +0530, Kannan wrote:
> @@ -518,7 +518,11 @@
> _("Unable to parse URL '%s'"), locn);
> }
>
> - rsrc->wr_url = apr_pstrdup(rsrc->pool, parse.path);
> + /* Canonicalize the base here as `svn_path_url_add_component2()'
> + won't handle it */
You don't need the above comment. We always canonicalise paths
received from input before using them.
> + rsrc->wr_url = svn_uri_canonicalize
> + (apr_pstrdup(rsrc->pool, parse.path), pool);
> +
This duplicates the string twice.
You don't need to duplicate the string before canonicalising it.
Canonicalisation will also create a copy.
Just do:
rsrc->wr_url = svn_uri_canonicalize(parse.path, rsrc->pool);
> ne_uri_free(&parse);
>
> return SVN_NO_ERROR;
> @@ -773,7 +777,7 @@
>
> Note that we're not sending the locks in the If: header, for
> the same reason we're not sending in MERGE's headers: httpd has
> - limits on the amount of data it's willing to receive in headers. */
> + limits on the amount of data it's willing to receive in headers. */
Why was this changed?
> apr_hash_t *child_tokens = NULL;
> svn_ra_neon__request_t *request;
> @@ -1389,8 +1393,11 @@
> vcc, NULL,
> &svn_ra_neon__checked_in_prop, pool));
> baseline_rsrc.pool = pool;
> - baseline_rsrc.vsn_url = baseline_url->data;
>
> + /* Canonicalize the base here as `svn_path_url_add_component2()'
> + won't handle it. */
Again, the comment is not necessary.
> + baseline_rsrc.vsn_url = svn_uri_canonicalize(baseline_url->data, pool);
> +
> /* To set the revision properties, we must checkout the latest baseline
> and get back a mutable "working" baseline. */
> err = checkout_resource(cc, &baseline_rsrc, FALSE, NULL, pool);
> @@ -1452,6 +1459,10 @@
> /* ### should we perform an OPTIONS to validate the server we're about
> ### to talk to? */
>
> + /* Canonicalize the base here as `svn_path_url_add_component2()'
> + won't handle it */
Same.
> + cc->ras->act_coll = svn_uri_canonicalize(cc->ras->act_coll, pool);
> +
> /*
> ** Create an Activity. This corresponds directly to an FS transaction.
> ** We will check out all further resources within the context of this
> Index: subversion/libsvn_ra_neon/props.c
> ===================================================================
> --- subversion/libsvn_ra_neon/props.c (revision 885339)
> +++ subversion/libsvn_ra_neon/props.c (working copy)
> @@ -991,7 +991,12 @@
>
> /* maybe return bc_url to the caller */
> if (bc_url)
> - *bc_url = *my_bc_url;
> + {
> + /* Canonicalize the base here as `svn_path_url_add_component2()'
> + won't handle it */
Same.
Thanks,
Stefan
> + bc_url->data = svn_uri_canonicalize(my_bc_url->data, pool);
> + bc_url->len = my_bc_url->len;
> + }
>
> if (latest_rev != NULL)
> {