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

Handling redirect (HTTP 302) gracefully in svn client for adding/copying

From: Lammel Roland <roland.lammel_at_kapsch.net>
Date: 2005-07-05 11:12:15 CEST

Hi all,

I've stumbled accross an annoying problem with my
apache2/gforge/subversion setup.

We have a setup where gforge/subversion is running on the same host (and
virtual server), therefor we have to have ErrorDocument configured to
what gforge needs (404.php), which basically does some redirection to
error/login pages.

As some other site might have similar needs, and run into the same
problem...

Problem description
===================
For the virtual host an ErrorDocument 404 handler is enabled, all
non-existing pages will trigger a redirect (HTTP 302) to a login page.
Here's the config part of apache2:

<VirtualHost *>
        ServerName my.forge.com
        DocumentRoot /usr/share/gforge/www/
        ErrorDocument 404 /404.php
        ...

### Error output of svn ci -m '' after adding the file
Adding (bin) lib/postgresql-8.0-311.jdbc3.jar
svn: Commit failed (details follow):
svn: PROPFIND request failed on
'/svn/test/trunk/lib/postgresql-8.0-311.jdbc3.jar'
svn: PROPFIND of '/svn/test/trunk/lib/postgresql-8.0-311.jdbc3.jar': 302
Found (http://my.forge.com)

Workaround/Solution
===================
Setting the ErrorDocument 404 default for the SVN repos locations solved
the problem.

    <Location /svn/test>
        DAV svn
        SVNPath /var/lib/gforge/svnroot/test
        AuthType Basic
        AuthName "test - Subversion Repository"
        AuthUserFile /var/lib/gforge/svnroot/test/.passwd
        ErrorDocument 404 default

        <LimitExcept GET PROPFIND OPTIONS REPORT>
            Require valid-user
        </LimitExcept>
    </Location>

See also thread "Unable to copy trunk to release" which show the same
error for copy:
http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=33383

SVN client usabilty
===================
For the average user the problem is far from obvious due to that error
response, as I don't know why a propfind is done for a file which has to
be added first to have properties on the server (same for copy to new
release).

Either the HTTP 302 (redirect) should be accepted too, like the expected
HTTP 404 (not found), for actions like add/copy, which would solve this
problem completly or a more obvious error could be reported to the user.

Any thought's on this?

Thanks for reading this far and BR

+rl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 5 11:14:15 2005

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