You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Martin Morrison <mm...@software.plasmon.com> on 2002/09/18 14:28:14 UTC

Problem commiting over https

Hello all,

I've spent that past couple of days trying to configure Subversion,
and am fresh out of ideas now!

I've set up a Subversion server on my FreeBSD box, and locally, it all
works fine. I then installed Apache2 with mod_ssl, and frigged with
the config til I could svn co over https.

Then, I tried to commit some changes. This is where is all went
wrong. I've tried it with various clients, all with the same problem,
which leads me to believe its a problem with my server (and probably
Apache) setup.

Client errors:

bash-2.05a$ svn --version
Subversion Client, version 0.14.2 (r3033)
   compiled Sep 16 2002, 10:47:39

Copyright (C) 2000-2002 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV)
  protocol.
  - handles 'http' schema
  - handles 'https' schema

bash-2.05a$ svn status
A      test/test.txt
bash-2.05a$ svn commit -m "Commited"  
svn: Error string not specified yet
svn: Commit failed (details follow):
svn: 
The specified URI does not refer to this repository, so it is
unusable.

On the Server side, Apache puts the following in its error.log 9with
IP address changed):

[Wed Sep 18 07:22:01 2002] [error] [client 1.1.1.1] Could not
CHECKOUT resource /!svn/bln/1.  [409, #0]
[Wed Sep 18 07:22:01 2002] [error] [client 1.1.1.1] The
activity href could not be parsed properly.  [409, #21114]
[Wed Sep 18 07:22:01 2002] [error] [client 1.1.1.1] (17)File
exists: The specified URI does not refer to this repository, so it is unusable.
 [409, #21114]

and this in access.log:

1.1.1.1 - martin [18/Sep/2002:07:21:59 -0700] "OPTIONS /test
            HTTP/1.1" 200 179
1.1.1.1 - martin [18/Sep/2002:07:22:00 -0700] "MKACTIVITY
            /!svn/act/a0f690c8-ecaa-0310-a627-cb167325182f HTTP/1.1" 201 289
1.1.1.1 - martin [18/Sep/2002:07:22:00 -0700] "PROPFIND /test
            HTTP/1.1" 207 367
1.1.1.1 - martin [18/Sep/2002:07:22:00 -0700] "PROPFIND
            /!svn/vcc/default HTTP/1.1" 207 328
1.1.1.1 - martin [18/Sep/2002:07:22:01 -0700] "CHECKOUT
            /!svn/bln/1 HTTP/1.1" 409 266

Here are a few bits from my httpd.conf which might be relevant:

<VirtualHost _default_:443>

<Location />
    DAV svn
    SVNPath /repository
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /usr/local/etc/svnuser.htpasswd
    Require valid-user
    SSLRequireSSL
</Location>

Can anyone help solve this problem?

Summary:
- locally, everything works
- over https, checkout works
- over https, a commit fails

Thanks in advance,
Martin


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

RE: [PATCH] Fix problem commiting to "/" Location

Posted by Sander Striker <st...@apache.org>.
> From: Philip Martin
> Sent: 18 September 2002 18:49

> Philip Martin <ph...@codematters.co.uk> writes:
> > Philip Martin <ph...@codematters.co.uk> writes:
> > 
> > > I get the same error over http when I try to commit to a "/" Location.
> > > Looks like we may have a bug, I seem to remember that "/" didn't work
> > > at all in the past, and that some recent changes made (some of) it
> > > work.
> 
> This "works for me", but I don't pretend to understand all this
> DAV/URL stuff.

Looks good to me, so I went ahead and committed it.

Sander

 
> * subversion/mod_dav_svn/util.c (dav_svn_simple_parse_uri): Handle
>   root that is "/"
> 
> Index: subversion/mod_dav_svn/util.c
> ===================================================================
> --- subversion/mod_dav_svn/util.c
> +++ subversion/mod_dav_svn/util.c	Wed Sep 18 17:39:44 2002
> @@ -184,6 +184,8 @@
>     */
>    len1 = strlen(path);
>    len2 = strlen(relative->info->repos->root_path);
> +  if (len2 == 1 && relative->info->repos->root_path[0] == '/')
> +    len2 = 0;
>    if (len1 < len2
>        || (len1 > len2 && path[len2] != '/')
>        || memcmp(path, relative->info->repos->root_path, len2) != 0)


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

[PATCH] Fix problem commiting to "/" Location

Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@codematters.co.uk> writes:

> Philip Martin <ph...@codematters.co.uk> writes:
> 
> > I get the same error over http when I try to commit to a "/" Location.
> > Looks like we may have a bug, I seem to remember that "/" didn't work
> > at all in the past, and that some recent changes made (some of) it
> > work.

This "works for me", but I don't pretend to understand all this
DAV/URL stuff.

* subversion/mod_dav_svn/util.c (dav_svn_simple_parse_uri): Handle
  root that is "/"

Index: subversion/mod_dav_svn/util.c
===================================================================
--- subversion/mod_dav_svn/util.c
+++ subversion/mod_dav_svn/util.c	Wed Sep 18 17:39:44 2002
@@ -184,6 +184,8 @@
    */
   len1 = strlen(path);
   len2 = strlen(relative->info->repos->root_path);
+  if (len2 == 1 && relative->info->repos->root_path[0] == '/')
+    len2 = 0;
   if (len1 < len2
       || (len1 > len2 && path[len2] != '/')
       || memcmp(path, relative->info->repos->root_path, len2) != 0)



-- 
Philip Martin

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

Re: Problem commiting over https

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

> >   len1 = strlen(path);
> >   len2 = strlen(relative->info->repos->root_path);
> >   if (len1 < len2
> >       || (len1 > len2 && path[len2] != '/')
> >       || memcmp(path, relative->info->repos->root_path, len2) != 0)
> >     {
> >       return svn_error_create(SVN_ERR_APMOD_MALFORMED_URI, 0, NULL, pool,
> >                               "The specified URI does not refer to this "
> >                               "repository, so it is unusable.");
> >     }
> > 
> > (gdb) p len1
> > $9 = 46
> > (gdb) p len2
> > $10 = 1
> > (gdb) p path
> > $11 = 0x80fd070 "/!svn/act/5ced1e32-edaa-0310-87f1-deb4c70d8c93"
> > (gdb) p relative->info->repos->root_path
> 
> 
> I'm confused.  Should dav_svn_simple_parse_uri ever be processing an
> activity uri??
> 
> What's the backtrace?

(gdb) bt
#0  dav_svn_simple_parse_uri (info=0xbffff8a0, relative=0x80fecc0, 
    uri=0x80fec40 "/!svn/act/e9c2d8c6-edaa-0310-8c3e-ac0711138a47", 
    pool=0x8102098) at ../svn/subversion/mod_dav_svn/util.c:166
#1  0x402b1ce2 in dav_svn_checkout (resource=0x80fecc0, auto_checkout=0, 
    is_unreserved=0, is_fork_ok=0, create_activity=0, activities=0x80feca8, 
    working_resource=0xbffff910) at ../svn/subversion/mod_dav_svn/version.c:183
#2  0x4029005e in dav_method_checkout (r=0x81020e8) at mod_dav.c:3415
#3  0x08078afe in ap_run_handler (r=0x81020e8) at config.c:194
#4  0x08078fd6 in ap_invoke_handler (r=0x81020e8) at config.c:400
#5  0x0806916b in ap_process_request (r=0x81020e8) at http_request.c:288
#6  0x080654a9 in ap_process_http_connection (c=0x80fc4d0) at http_core.c:293
#7  0x08081582 in ap_run_process_connection (c=0x80fc4d0) at connection.c:85
#8  0x080776b8 in child_main (child_num_arg=-1073743712) at prefork.c:696
#9  0x0807785a in make_child (s=0x80b62d8, slot=0) at prefork.c:736
#10 0x080778b3 in startup_children (number_to_start=5) at prefork.c:808
#11 0x08077fa9 in ap_mpm_run (_pconf=0x8076f98, plog=0x80b40c0, s=0x80b62d8)
    at prefork.c:1024
#12 0x0807c9a4 in main (argc=2, argv=0xbffffbb4) at main.c:645
(gdb) 

It appears that "normally" it gets

   root /foo
   path /foo/!....

and path[len(root)] == '/'.  This obviously fails when root is /.

-- 
Philip Martin

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

Re: Problem commiting over https

Posted by Ben Collins-Sussman <su...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:

> Philip Martin <ph...@codematters.co.uk> writes:
> 
> > I get the same error over http when I try to commit to a "/" Location.
> > Looks like we may have a bug, I seem to remember that "/" didn't work
> > at all in the past, and that some recent changes made (some of) it
> > work.
> 
> >From mod_dav_svn/util.c:dav_svn_simple_parse_uri
> 
>   len1 = strlen(path);
>   len2 = strlen(relative->info->repos->root_path);
>   if (len1 < len2
>       || (len1 > len2 && path[len2] != '/')
>       || memcmp(path, relative->info->repos->root_path, len2) != 0)
>     {
>       return svn_error_create(SVN_ERR_APMOD_MALFORMED_URI, 0, NULL, pool,
>                               "The specified URI does not refer to this "
>                               "repository, so it is unusable.");
>     }
> 
> (gdb) p len1
> $9 = 46
> (gdb) p len2
> $10 = 1
> (gdb) p path
> $11 = 0x80fd070 "/!svn/act/5ced1e32-edaa-0310-87f1-deb4c70d8c93"
> (gdb) p relative->info->repos->root_path


I'm confused.  Should dav_svn_simple_parse_uri ever be processing an
activity uri??

What's the backtrace?

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

Re: Problem commiting over https

Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@codematters.co.uk> writes:

> I get the same error over http when I try to commit to a "/" Location.
> Looks like we may have a bug, I seem to remember that "/" didn't work
> at all in the past, and that some recent changes made (some of) it
> work.

Re: Problem commiting over https

Posted by Philip Martin <ph...@codematters.co.uk>.
Martin Morrison <mm...@software.plasmon.com> writes:

> <Location />
>     DAV svn
>     SVNPath /repository
>     AuthType Basic
>     AuthName "Subversion Repository"
>     AuthUserFile /usr/local/etc/svnuser.htpasswd
>     Require valid-user
>     SSLRequireSSL
> </Location>
> 
> Can anyone help solve this problem?
> 
> Summary:
> - locally, everything works
> - over https, checkout works
> - over https, a commit fails

I get the same error over http when I try to commit to a "/" Location.
Looks like we may have a bug, I seem to remember that "/" didn't work
at all in the past, and that some recent changes made (some of) it
work.

Martin, change to something like <Location /svn>, checkout a new
working copy and try committing from that.

-- 
Philip Martin

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