[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Issue #1901 (double slashes screw things): Patch, and some strategy questions

From: Ben Reser <ben_at_reser.org>
Date: 2004-07-04 06:57:54 CEST

On Sun, Jul 04, 2004 at 03:25:31AM +0200, Branko ??ibej wrote:
> I don't think that's the case. I believe hierarchical URL schemas (all
> of ours, http[s]://, svn[+...]:// and file:// are such) pretty much
> define how the path part should look like.

Correct but what it means is up to the app. That's what I meant.

> And the path portion of the
> file:// (not file:///!) URLs is _not_ interpreted by the OS. It's
> converted _to_ an OS-specific path -- it's merely a coincidence that
> everything after the second slash happens to look like a canonical path
> on Unix (well... not really a coincidence, but let's not split hairs).

Well that's not entirely true. file:/// are more tied to the platform
that a URL is. Ultimately we do some translation of the URL into a
path for that system, but the vast majority of it get passed through.

> As far as I know, double slashes aren't allowed in the path part of URLs.

That's not what the URL BNC says:
      hier_part = ( net_path | abs_path ) [ "?" query ]
      net_path = "//" authority [ abs_path ]
      abs_path = "/" path_segments
      path_segments = segment *( "/" segment )
      segment = *pchar *( ";" param )
      param = *pchar
      pchar = unreserved | escaped |
                      ":" | "@" | "&" | "=" | "+" | "$" | ","

The above is taken from:

Note that a segment can consist of no characters.

Incidentally, no special meaning is given to /./ and /../ but everyone
seems to apply them.
> I think it's pretty much obvious that all our APIs, except the two you
> mention, require a canonical path (or URL) encoded in UTF-8. I'd
> actually go as far as to require the coding to be in Normalized Form C,
> for consistency -- not that we can guarantee that even in our own client
> programs right now.

Well it's not documented anywhere. It seems that this is our intention,
but without documentation I don't think we should be surprised when
clients, including our own, aren't following this.

> "Principle of least surprise" here. Ah, except svn_path_local_style. :-)

Ahh yes...

Ben Reser <ben@reser.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jul 4 06:58:38 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.