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

Re: Yet more DAV bugs

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: Thu, 22 May 2008 22:19:00 +0200

epg_at_google.com wrote:
> Both ra-serf and neon misbehave when doing get_file on a
> directory or get_dir on a file.
>
> # ra-svn (right)
> 0 svn% ./get_dir-file svn://svnfe-test/r 84
> doing get_dir2 on a file (welcome)
> subversion/libsvn_fs_fs/dag.c:425: (apr_err=160016)
> foo: Can't get entries of non-directory
>
> # ra-neon (wrong)
> 1 svn% ./get_dir-file https://svnfe-test/r 84
> doing get_dir2 on a file (welcome)
> bad, should have died but got 0x8084970 0x807dfd0 (1 dirents)
> d welcome
>
> # ra-serf (different wrong)
> 0 svn% ./get_dir-file https://svnfe-test/r 84
> doing get_dir2 on a file (welcome)
> bad, should have died but got 0x80c81c0 0x80c80a0 (0 dirents)
>
> # ra-svn
> 0 svn% ./get_file-dir svn://svnfe-test/r 84
> doing get_file on a dir (changes)
> subversion/libsvn_fs_fs/dag.c:984: (apr_err=160017)
> foo: Attempted to get checksum of a *non*-file node
>
> # ra-neon (wrong)
> 1 svn% ./get_file-dir https://svnfe-test/r 84
> doing get_file on a dir (changes)
> subversion/libsvn_ra_neon/util.c:549: (apr_err=175011)
> foo: Repository moved permanently to 'https://svnfe-test/r/!svn/bc/119447/changes/'; please relocate
>
> # ra-serf (different wrong)
> 1 svn% ./get_file-dir https://svnfe-test/r 84
> doing get_file on a dir (changes)
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>301 Moved Permanently</title>
> </head><body>
> <h1>Moved Permanently</h1>
> <p>The document has moved here.</p>
> </body></html>
> bad, should have died

I've tested get_file_dir over ra_serf, and found that - unlike svnserve
- mod_dav_svn doesn't care if you're asking directory information
(PROPFIND allprop Depth:1) on a file. Which means that ra_serf doesn't
know anything was wrong.

Now we can correct this by adding an extra check to see of the directory
is really a directory. AFAIC the extra cost of the PROPFIND request to
the server is not worth it. Also, there's a nice workaround: if you
don't know if you're handling a file or a directory, use svn_ra_check_path.

Lieven

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-22 22:19:18 CEST

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.