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

Re: Working on issue #946

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-01-03 18:01:44 CET

Peter Allin <peter@arbejdskamp.dk> writes:

> As mentioned on Issuezilla I've found out that the 405 error is
> returned, when I try to checkout (or otherwise access) an URL that
> doesn't point at a repository.

And as Greg Stein mentioned in the issue, this is correct. 405 means
that there's no dav resource at that location (i.e. no repository).
404 means you're looking in a dav-y area, but the resource dosen't
exist.

Still, I guess it would be nice to throw *descriptive* error strings
to the user, which is what you're trying to do. :-)

> Where the call to svn_ra_dav__get_starting_props() returns a 405
> error. The the while-loop starts removing components from the path, but
> each of the thus generated paths also results in a 405. The while loop
> continues until the path is cut down to "/". Then the
> svn_path_remove_component() function returns "/" and the "whoa,
> infinite loop, get out" return is executed with the 405 errorcode.

Correct.

> Would it be OK to return an error saying something like "The URL %s is
> not part of any repository" if the path becomes "/" without the
> svn_ra_dav__get_starting_props() succeeding? As far as I can see it
> would work - but maybe it breaks some outher usage of the
> svn_ra_dav__get_baseline_props() function?

That sounds like a good strategy to me. I don't think it will break
anything. Why not just wrap the error in the infinite-loop-break-out
routine?

> svn_path_remove_component(path_s);
> if (path_s->len == len)
> /* whoa, infinite loop, get out. */
> return err;

instead of 'return err', how about

  return svn_error_quick_wrap (err, "The path was not part of repository")

or something?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 3 18:04:36 2003

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