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

Re: svn ls bug in RC3

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-09-27 16:35:29 CEST

SteveKing <steveking@gmx.ch> writes:

> svn ls http://localhost/svn/test/testparent
> returns
> as expected. But an
> svn ls http://localhost/svn/test/testparent/%f6%e4%fc%c4%d6%dc
> returns
> /
> file1.txt

There is an inconsistency with the alphabetic case used when URI

Breakpoint 4, svn_ra_dav__get_dir (session_baton=0x8099d70,
    path=0x40039131 "", revision=3, dirents=0xbffff80c, fetched_rev=0x0,
    props=0x0, pool=0x808b1f8) at ../svn/subversion/libsvn_ra_dav/fetch.c:919
919 if (strcmp(resource->url, stripped_final_url) == 0)
(gdb) p resource->url
$8 = 0x80a1248 "/obj/repo/!svn/bc/3/f%c3%a3o"
(gdb) p stripped_final_url
$9 = 0x80a22e0 "/obj/repo/!svn/bc/3/f%C3%A3o"

strcmp will treat those URLs as different.

Now Subversion's path.c:uri_escape() uses sprintf("%%%02X") so it should
produce upper case, however the server sends lower case

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:ns1="http://subversion.tigris.org/xmlns/dav/" xmlns:ns0="DAV:">
<D:response xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/">

I'm not sure where that gets produced, but Apache's util.c:c2x() uses
c2x_table[] = "0123456789abcdef" so it could be that.

A quick fix might be to make Subversion use lower case, a less fragile
fix would be to compare URLs using a function that handles escape
sequences that differ in case.

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 27 16:35:49 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.