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

Hostnames should be case-insensitive - tryiing to solve issue 2475

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2006-03-08 00:50:26 CET


I started working on issue 2475. The problem reported in that issue is that
hostnames in URIs should be case-insensitive ( as per RFC3986 ).

The problem surfaces when two URLs are compared. E.g. when a file is copied
from one folder to another, a case-sensitive check is done wether source and
target folders are from the same repository.

Now, I've checked the code for places where this type of test is done, and I
found some 30 instances of strcmp & strncmp where URLs are involved. Most of
them in libsvn_client and libsvn_wc, some in libsvn_ra* and libsvn_repos.

I see some possible options to solve this:

Option 1. Make lowercase of all the hostnames in all the URLs on entry point
in the code, don't touch the case-sensitive checks. Maybe the easiest
solution, but not very clear in error messages etc.

Option 2. Replace all the strcmp and strncmp calls ( only those where URLs
are compared ) with their case-insensitive equivalents.

Option 3. Create one new function url_compare() where a correct,
standards-compliant URL comparison is implemented, use that function in all
places where strcmp/strncmp is used now. What would be a good place to
define such a function?

I prefer option 3 myself. Maybe there are other and better options? Anybody
any thoughts on the subject?

thanks for your input,


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 8 00:53:37 2006

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