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

URL canonicalization with 1.6 clients and 1.7 servers

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 20 Jan 2012 10:59:50 +0000

1.7 has stricter rules for canonical URLs (from RFC 3986) than 1.6:

 - no default port:

    "http://host/repo" not "http://host:80/repo"

 - no lowercase % encoding:

    "http://host/repo/%C3%A5" not "http://host/repo/%c3%a5"

 - no unnecessary % encoding:

    "http://host/repo/A" not "http://host/repo/%41"

All the above URLs can be used with a 1.7 client because the client
converts them to canonical form, but a 1.6 client will not do the
conversion and will pass the non-canonical form to the server. A 1.7
server will sometimes reject such URLs:

   $ svn-1.6 co http://localhost:80/repo
   svn: Path 'http://localhost:80/repo' is not canonicalized; there is a problem with the client.

although some commands work:

   $ svn-1.6 ls http://localhost:80/repo
   A

So this is a break in compatibility, which we justify by saying that the
URLs are not canonical. Could we do better? We could make the server
canonicalize the URL. That would probably allow the non-canonical URLs
to work, but might introduce problems like issue 3601:
http://subversion.tigris.org/issues/show_bug.cgi?id=3601

Should we attempt backwards compatibility or should we simply require
clients to upgrade or avoid the URLs?

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-01-20 12:00:28 CET

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.