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

Re: [PATCH] mod_dav_svn directory listing i18n fix, and odd bug

From: <cmpilato_at_collab.net>
Date: 2002-07-22 19:51:40 CEST

Marcus Comstedt <marcus@mc.pp.se> writes:

> Ok, my DAV i18n testing has begun, and so far mostly so good. The
> directory listing generated when browsing the repository with a web
> browser fails to set a charset, though. Since the default charset for
> HTML is ISO-8859-1, filenames do not get displayed correctly. This
> patch fixes the problem:
>
> Index: ./subversion/mod_dav_svn/repos.c
> ===================================================================
> --- ./subversion/mod_dav_svn/repos.c
> +++ ./subversion/mod_dav_svn/repos.c Mon Jul 22 19:24:31 2002
> @@ -1354,7 +1354,7 @@
> if (resource->info->repos->xslt_uri)
> mimetype = "text/xml";
> else
> - mimetype = "text/html";
> + mimetype = "text/html; charset=UTF-8";
> }
> else if (resource->info->delta_base != NULL)
> {

Beautiful!

> Next, I've found a more tricky bug somewhere but I don't know how to
> start looking for it. Line 163 in util.c didn't seem like the right
> place. What's odd is that everything works if only _one_ of the
> compared files is from the repository:
>
> pelix:~/svntest/test3% svn diff -r 2 hälsning
> Index: ./hälsning
> ===================================================================
> --- ./hälsning
> +++ ./hälsning Mon Jul 22 19:19:00 2002
> @@ -1 +1 @@
> -hallå
> +ajö
> pelix:~/svntest/test3% svn diff -r 3 hälsning
> pelix:~/svntest/test3% svn diff -r 2:3 hälsning
>
> subversion/libsvn_ra_dav/util.c:163
> svn_error: #21073 : <Name does not refer to a filesystem file>
>
> Attempted to get length of a *non*-file node.
>
> pelix:~/svntest/test3%
>
> Well, maybe some printf debugging in the server will clear the
> situation out...

There are known bugs (well, known to me at least) in the mod_dav_svn
code with respected to non URI-safe characters. The biggest one
involves a XML element returned to the client in a PROPFIND called
"baseline-relative-path". mod_dav_svn is NOT called
svn_path_uri_encode() on that value, and that causes the client to try
to lookup some URLs with non URI-safe characters.

At this point, I don't know what to change -- that is, the item is
called a "relative path", so should it remain un-encoded and client
encode it when treating it as a URL, or should it be encoded and the
client do nothing special to it?

GStein? Help?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 22 19:53:20 2002

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.