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

GET a collection without a trailing slash WAS: RE: svn commit: rev 965 - trunk/subversion/mod_dav_svn

From: Sander Striker <striker_at_apache.org>
Date: 2002-01-19 16:16:57 CET

Hi,

[...]
> > Log:
> > Add a response for GET for a collection (to support browsing of the
> > repository).
>
> Ofcourse I had to test this... :)
>
> Funny thing happens when I request a dir _without_ a trailing
> slash. I saw you took measures for this in the code and want
> to redirect the client. However, this shows up in my error log:
>
> [Sat Jan 19 15:31:43 2002] [error] [client 192.168.0.10] Could not fetch resource information. [500, #0]
> [Sat Jan 19 15:31:43 2002] [error] [client 192.168.0.10] (2)No such file or directory: Requests for a collection must have a
> trailing slash on the URI. [301, #0]
>
> Seems that the error doesn't bubble up correctly and 500 is returned instead of the 301.

The problem seems to be in mod_dav.c around line 682:

    /* resolve the resource */
    err = (*conf->provider->repos->get_resource)(r, conf->dir,
                                                 label, use_checked_in,
                                                 res_p);
    if (err != NULL) {
        err = dav_push_error(r->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
                             "Could not fetch resource information.", err);
        return err;
    }

mod_dav_svn indeed returned an error, but the error it returned
was:

      return dav_new_error(r->pool, HTTP_MOVED_PERMANENTLY, 0,
                           "Requests for a collection must have a "
                           "trailing slash on the URI.");

My gut instinct says that mod_dav.c should not push HTTP_INTERNAL_SERVER_ERROR
on the error stack and just pass down the error it was given. But, Greg
knows why it does push that one on the stack, no doubt :)
I'll just wait for the correct solution.

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:57 2006

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.