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.
Received on 2011-06-21 12:19:51 CEST