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

RE: svn commit: r1137927 - in /subversion/trunk/subversion: libsvn_subr/dirent_uri.c tests/libsvn_subr/dirent_uri-test.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Tue, 21 Jun 2011 12:22:27 +0200

> -----Original Message-----
> From: Stefan Sperling [mailto:stsp_at_elego.de]
> Sent: dinsdag 21 juni 2011 12:19
> To: dev_at_subversion.apache.org
> Subject: Re: svn commit: r1137927 - in /subversion/trunk/subversion:
> libsvn_subr/dirent_uri.c tests/libsvn_subr/dirent_uri-test.c
>
> On Tue, Jun 21, 2011 at 10:13:16AM -0000, rhuijben_at_apache.org wrote:
> > Author: rhuijben
> > Date: Tue Jun 21 10:13:16 2011
> > New Revision: 1137927
> >
> > URL: http://svn.apache.org/viewvc?rev=1137927&view=rev
> > Log:
> > A canonical url to a http:, https: and svn: repository shouldn't contain
the
> > default port number. With a default port number it is a valid url, but
it is
> > not canonical.
> >
> > Make svn_uri_canonicalize remove default port numbers and
> svn_is_canonicalize
> > return false on uris with invalid and/or default port numbers.
>
> > + if (port == 80 && strncmp(uri, "http:", 5) == 0)
> > + return FALSE;
> > + else if (port == 443 && !strncmp(uri, "https:", 6) == 0)
> > + return FALSE;
> > + else if (port == 3690 && !strncmp(uri, "svn:", 4) == 0)
> > + return FALSE;
>
> This breaks e.g. running svnserve on port 80.
> I don't think it's a good idea to assume that people aren't going to
> run some service on the default port of another service.
> Port numbers are conventions, not hard rules.

No, this doesn't break svnserve on port 80. (Please read the rest of the
code)

It disallows http://host:80/dir/, where it does allow http://host/dir/ and
http://host:81/dir/

All user provided paths would go through svn_uri_canonicalize() which would
make a user provided "http://host:80/dir/" path go through our api as
"http://host/dir": the canonical form.

        Bert
Received on 2011-06-21 12:23:23 CEST

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.