You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexy Khrabrov <al...@setup.org> on 2002/07/30 12:53:09 UTC

still no luck with http://svn.host.tld/

I'm still trying to host my SVN repository at www.suffix.com,
and looks like DAV doesn't work in <Location />.  Here's what
I get in the access_log:

128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET / HTTP/1.1" 301 308
128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET // HTTP/1.1" 403 280

That is, for some reason it gets redirected to //, which can't exist!

The error_log reads,

[Tue Jul 30 08:46:08 2002] [error] [client 128.6.178.78] Could not fetch resource information.  [301, #0]
[Tue Jul 30 08:46:08 2002] [error] [client 128.6.178.78] (2)No such file or directory: Requests for a collection must have a trailing slash on the URI.  [301, #0]

The corresponding VirtualHost section is:

<VirtualHost *>
    ServerAdmin webmaster@svn.setup.org
    DocumentRoot /usr/local/httpd/htdocs/svnroot
    ServerName svn
    ServerAlias svn svn.setup.org suffix.com www.suffix.com
    ErrorLog logs/svn.setup.org-error_log
    CustomLog logs/svn.setup.org-access_log common

#RewriteEngine On
#RewriteRule ^/$ /svn [R]
#<Directory /usr/local/httpd/htdocs/svnroot>
#  DAV svn
#  SVNpath /svn/repository
#</Directory>

<Location />
  DAV svn
  SVNpath /svn/repository
</Location>
</VirtualHost>

As you can see, I tried all kinds of rewrite, Directory instead of Location,
but to no avail.

Any explanation would be highly appreciated, as this mystery completely
befuddles me!  Is there anybody out there hosting his or her SVN at the
top level, without any /paths?

Cheers,
Alexy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: still no luck with http://svn.host.tld/

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Jul 30, 2002 at 10:16:18PM +0100, Dave Cridland wrote:
> On Tue, 2002-07-30 at 13:53, Alexy Khrabrov wrote:
> > 
> > I'm still trying to host my SVN repository at www.suffix.com,
> > and looks like DAV doesn't work in <Location />.  Here's what
> > I get in the access_log:
> > 
> > 128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET / HTTP/1.1" 301 308
> > 128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET // HTTP/1.1" 403 280
> > 
> > That is, for some reason it gets redirected to //, which can't exist!

This is a bug in mod_dav_svn. The logic in dav_svn_get_resource() for
computing "had_slash" is incorrect. Specifically, it ties it in along with
the removal of a trailing slash. Well, the URI *does* have a trailing slash,
but it isn't removed since it is the root. Thus, the code *thinks* there was
no trailing slash, so it issues the 301 redirection.

I don't have an actual patch, but can you change the code around line 870 to
read:

  len1 = strlen(uri);
  had_slash = uri[len1 - 1] == '/';
  if (len1 > 1 && had_slash)
    uri[len1 - 1] = '\0';

Just replace the whole section (down thru the else clause) with the above
code.

[ sorry, but I just can't get it tested myself; I've got some other stuff
  that needs to be done ]

>...
> Confirmed here too, although I tried with <Directory> rather than
> <Location>.

Directory is *never* going to work. You must always use Location to
configure an SVN repository. This is because the repository is not located
in the filesystem (according to Apache's concept of that). Instead, you set
up a logical location and then use SVNPath to state where the physical
repository resides.

> I'll build the latest revision and see what happens then. I might take
> this one to task and see if I can find the problem, but it's probably
> way beyond me. I have to admit I'd *like* this one to work.

See the code above. I suspect that will work.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: still no luck with http://svn.host.tld/

Posted by Dave Cridland <da...@cridland.net>.
On Tue, 2002-07-30 at 13:53, Alexy Khrabrov wrote:
> 
> I'm still trying to host my SVN repository at www.suffix.com,
> and looks like DAV doesn't work in <Location />.  Here's what
> I get in the access_log:
> 
> 128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET / HTTP/1.1" 301 308
> 128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET // HTTP/1.1" 403 280
> 
> That is, for some reason it gets redirected to //, which can't exist!
> 
> The error_log reads,
> 
> [Tue Jul 30 08:46:08 2002] [error] [client 128.6.178.78] Could not fetch resource information.  [301, #0]
> [Tue Jul 30 08:46:08 2002] [error] [client 128.6.178.78] (2)No such file or directory: Requests for a collection must have a trailing slash on the URI.  [301, #0]

Confirmed here too, although I tried with <Directory> rather than
<Location>.

I got:

192.168.0.254 - - [30/Jul/2002:20:39:34 +0100] "GET / HTTP/1.0" 301 324
192.168.0.254 - - [30/Jul/2002:20:39:36 +0100] "GET // HTTP/1.0" 403 288

[Tue Jul 30 20:39:35 2002] [error] [client 192.168.0.254] Could not
fetch resource information.  [301, #0]
[Tue Jul 30 20:39:35 2002] [error] [client 192.168.0.254] (84)Invalid or
incomplete multibyte or wide character: Requests for a collection must
have a trailing slash on the URI.  [301, #0]

User-Agent was:

[root@gateway root]# rpm -q lynx
lynx-2.8.4-18

(RedHat 7.3 + updates)

Also tried:

--
[root@turner root]# telnet svn.gestalt.entity.net 80
Trying 192.168.0.254...
Connected to gateway.gestalt.entity.net (192.168.0.254).
Escape character is '^]'.
GET / HTTP/1.1
Host: svn.gestalt.entity.net

HTTP/1.1 301 Moved Permanently
Date: Tue, 30 Jul 2002 21:10:06 GMT
Server: Apache/2.0.40-dev (Unix) DAV/2 SVN/0.14.0 (dev build)
Location: http://svn.gestalt.entity.net//
Content-Length: 324
Content-Type: text/html; charset=iso-8859-1

<!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 <a
href="http://svn.gestalt.entity.net//">here</a>.</p>
<hr />
<address>Apache/2.0.40-dev Server at svn.gestalt.entity.net Port
80</address>
</body></html>
--

Build is:

[root@gateway root]# rpm -q subversion-server
subversion-server-0.14.0-2748

I'll build the latest revision and see what happens then. I might take
this one to task and see if I can find the problem, but it's probably
way beyond me. I have to admit I'd *like* this one to work.

Dave.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org