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

Re: svn commit: rev 2392 - trunk/subversion/mod_dav_svn

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-07-02 20:08:21 CEST

striker@tigris.org wrote:

>Author: striker
>Date: Tue, 02 Jul 2002 06:16:08 -0500
>New Revision: 2392
>
>Modified:
> trunk/subversion/mod_dav_svn/repos.c
>Log:
>* subversion/mod_dav_svn/repos.c
>
> (dav_svn_deliver): Make the autoindex look just a tiny bit nicer
> by not escaping the parts visible to the user.
>
>
>Modified: trunk/subversion/mod_dav_svn/repos.c
>==============================================================================
>--- trunk/subversion/mod_dav_svn/repos.c (original)
>+++ trunk/subversion/mod_dav_svn/repos.c Tue Jul 2 06:16:14 2002
>@@ -1521,7 +1521,7 @@
> if (resource->info->repos_path == NULL)
> title = "unknown location";
> else
>- title = ap_escape_uri(resource->pool, resource->info->repos_path);
>+ title = resource->info->repos_path;
>
> if (SVN_IS_VALID_REVNUM(resource->info->root.rev))
> title = apr_psprintf(resource->pool,
>@@ -1593,20 +1593,20 @@
> (void) svn_fs_is_dir(&is_dir, resource->info->root.root,
> entry_path, entry_pool);
>
>- name = ap_escape_uri(entry_pool, item->key);
>-
>+ name = item->key;
>+
> /* append a trailing slash onto the name for directories. we NEED
> this for the href portion so that the relative reference will
> descend properly. for the visible portion, it is just nice. */
> if (is_dir)
>- href = apr_pstrcat(entry_pool, name, "/", NULL);
>- else
>- href = name;
>+ name = apr_pstrcat(entry_pool, name, "/", NULL);
>+
>+ href = ap_escape_uri(entry_pool, name);
>
This bit is wrong. 'href' must end in a / if it represents a directory,
and 'name' must _not_ end in a slash if we're generating XML output.

>
> if (gen_html)
> ap_fprintf(output, bb,
> " <li><a href=\"%s\">%s</a></li>\n",
>- href, href);
>+ href, name);
> else
> {
> const char *const tag = (is_dir ? "dir" : "file");
>
>

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 2 20:09:09 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.