Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: [RFC] Paths API (svn_dirent_uri.h) - improvements

subversion
Discussion topic

Back to topic list

Re: [RFC] Paths API (svn_dirent_uri.h) - improvements

Author gstein
Full name Greg Stein
Date 2009-11-11 12:37:01 PST
Message On Wed, Nov 11, 2009 at 07:25, Julian Foad <julian.foad@wand​isco.com> wrote:
>...
> RELPATH:
>
> A "relpath" represents "an unrooted path that can be joined to any other
> relative path, uri or dirent". Good, but let's specify it more
> precisely. The terms "absolute" and "relative" are not clearly defined
> when applied to partially-relative paths such as a Windows
> "\rel-to-current-drive" or a URL "/rel-to-server".

No. The intent is to NOT have any leading slashes. A relpath should be
"path/to/some/place". Change the docstring accordingly.

The intent is that a relpath is always attached to some root. For
Windows that could be "\". For a URL, that could be
"http://hostname/". Whatever. But never ever a leading slash.

>...
> URI:
>
> A "uri" in this API represents an "absolute path that starts with a '/'
> or a schema definition"... which is gratuitously specialized, compared
> with the official definition of a URI.
>
> We use URLs a lot and rarely need to use more general URIs, so I think
> the API should be geared specifically to URLs.
>
> It is not clear whether the representation of a URI is URI-encoded. The
> API should make a clear promise. I think it should be, both because
> that's a valuable part of the utility of a URL API, and because it seems
> unlikely to be possible to fully support URL manipulations without them
> being URI-encoded. (The sort of thing that springs to mind that simply
> would not work is if my password contains a "/" and I try to represent
> "http://username:pass​word at my dot org/" without URI-encoding.)

Bert has been making a bunch of changes throughout the codebase in
order to make the URI APIs take *only* absolute URIs. Never a relative
URI.

>...
> URLS:
>
> * Define and name functions for URLs instead of URIs.

Nope.

I spoke at length, last week, with Roy Fielding about this specific
topic. I explained our scenarios, and he recommended that we *stick*
to the URI name.

Sure, the APIs only deal with a subset of the URI space, but that
isn't a problem. Just document it as "we only handle <these> schemes".
And people aren't really using URNs anyway, so it doesn't matter much.

Over time, "the world" will converge on just the URI naming. We should
stick to the URI name in our APIs, and let the world catch up. Our
APIs are going to be around for a *long* time. Let's use the
correct/future names for it.

(and if you don't know who Roy is... he's one of the *primary* authors
of the URI specification; as far as I'm concerned, what he says goes;
I've found him to be rarely wrong, and you can ask Sander and Justin
to verify that :-P )

> * The representation of a URL should be always URI-encoded.

Yah. That's how we treat them, in general, but having it declared that
way would be good. As I noted above, we also want them to *always* be
absolute. The codebase is pretty darned close to allowing for that.
Also note that the svn_uri_* functions are new in 1.7, so we can
define them with this restriction.

>...

Outside of the above... *shrug*. Seems fine.

Cheers,
-g

« Previous message in topic | 14 of 24 | Next message in topic »

Messages

Show all messages in topic

[RFC] Paths API (svn_dirent_uri.h) - improvements Julian Foad <julian dot foad at wandisco dot com> Julian Foad <julian dot foad at wandisco dot com> 2009-11-11 04:25:58 PST
     Re: [RFC] Paths API (svn_dirent_uri.h) - improvements stsp Stefan Sperling 2009-11-11 05:08:20 PST
         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements Julian Foad <julian dot foad at wandisco dot com> Julian Foad <julian dot foad at wandisco dot com> 2009-11-11 05:15:17 PST
             Re: [RFC] Paths API (svn_dirent_uri.h) - improvements stsp Stefan Sperling 2009-11-11 06:02:48 PST
                 Re: [RFC] Paths API (svn_dirent_uri.h) - improvements Julian Foad <julian dot foad at wandisco dot com> Julian Foad <julian dot foad at wandisco dot com> 2009-11-11 06:34:19 PST
                     Re: [RFC] Paths API (svn_dirent_uri.h) - improvements brane Branko Cibej 2009-11-11 08:46:25 PST
                         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements stsp Stefan Sperling 2009-11-11 09:02:07 PST
                             Re: [RFC] Paths API (svn_dirent_uri.h) - improvements brane Branko Cibej 2009-11-11 11:37:42 PST
                                 Re: [RFC] Paths API (svn_dirent_uri.h) - improvements stsp Stefan Sperling 2009-11-11 11:48:19 PST
         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements brane Branko Cibej 2009-11-11 05:29:37 PST
     Re: [RFC] Paths API (svn_dirent_uri.h) - improvements brane Branko Cibej 2009-11-11 05:25:23 PST
         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements Julian Foad <julian dot foad at wandisco dot com> Julian Foad <julian dot foad at wandisco dot com> 2009-11-11 05:33:54 PST
             RE: [RFC] Paths API (svn_dirent_uri.h) - improvements rhuijben Bert Huijben 2009-11-11 05:51:49 PST
     Re: [RFC] Paths API (svn_dirent_uri.h) - improvements gstein Greg Stein 2009-11-11 12:37:01 PST
         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements brane Branko Cibej 2009-11-11 13:26:52 PST
             Re: [RFC] Paths API (svn_dirent_uri.h) - improvements gstein Greg Stein 2009-11-11 14:07:54 PST
                 Re: [RFC] Paths API (svn_dirent_uri.h) - improvements gstein Greg Stein 2009-11-11 14:09:31 PST
                     Re: [RFC] Paths API (svn_dirent_uri.h) - improvements brane Branko Cibej 2009-11-11 14:26:27 PST
                         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements gstein Greg Stein 2009-11-11 14:32:46 PST
         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements Julian Foad <julian dot foad at wandisco dot com> Julian Foad <julian dot foad at wandisco dot com> 2009-11-12 06:57:33 PST
             Re: [RFC] Paths API (svn_dirent_uri.h) - improvements gstein Greg Stein 2009-11-12 09:02:47 PST
     Re: [RFC] Paths API (svn_dirent_uri.h) - improvements rdonch Roman Donchenko 2009-11-11 12:59:36 PST
         Re: [RFC] Paths API (svn_dirent_uri.h) - improvements stsp Stefan Sperling 2009-11-11 13:10:47 PST
     Re: [RFC] Paths API (svn_dirent_uri.h) - improvements rdonch Roman Donchenko 2009-11-11 16:44:20 PST
Messages per page: