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

RE: OK, so copy is supposed to work now? (as it still isn't, hehe)

From: Jay Freeman \(saurik\) <saurik_at_saurik.com>
Date: 2001-12-04 22:49:23 CET

OK, I've been able to track this down farther. It gets into
dav_method_copymove, and is able to do the svn_get_resource fine.
However, when it goes later and calls dav_lookup_uri on dest it fails.
 
(gdb) print dest
$29 = 0x8134721
"http://www.saurik.com:423/ninetjer/$svn/wrk/349975ba-d11d-b211-8a60-f50
ace7541fa//tom"
 
The line of code is:
lookup = dav_lookup_uri(dest, r, 1 /* must_be_absolute */);
 
The lookup.rnew == NULL test fails, and the .err.status !=
HTTP_BAD_REQUEST, so it falls through to:
 
 return dav_error_response(r, lookup.err.status, lookup.err.desc);
 
*adds another break point*
 
BTW, I think someone tried to run the reproduction against my server
while I was debugging it, so if someone got some strange results, you
know why :).
 
God damn it... lo and behold:
 
280 if (comp.hostname != NULL &&
281 !ap_matches_request_vhost(r, comp.hostname, port)) {
282 result.err.status = HTTP_BAD_GATEWAY;
283 result.err.desc = "Destination URI refers to a different
server.";
284 return result;
285 }
 
 
It DOES think it is on a different server, just like Joe said... why is
it talking about "vhost"s... I don't have any vhosts....
 
*steps into that evil, evil apr_matches_request_vhost function*
 
OK, it's comparing
 
"www.saurik.com", 423
 
against
 
"", 0
 
 
It has a special check to know that if sar->host_port is 0 it is a match
(as it doesn't matter at that point), but there _isn't_ any special case
code for "".
 
After it does that, it verifies that the port MUST match before doing
the last ditch effort of running matches_alias, and returns 0.
 
Yep, I added the following to my httpd.conf and it works now:
 
ServerName www.saurik.com:423
 
Is this a bug in DAV? Maybe a limitation of COPY's where it _needs_ a
name to be given somewhere? If the latter, this should be specified in
the Subversion server_setup file, as I know I don't know that much about
what allows DAV to do it's magic :-P.
 
Why is svn even sending the host in the URL again? Can't it just send
an absolute path to the server? The comment about "must_be_absolute" is
rather vague.
 
Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
 
-----Original Message-----
From: Jay Freeman (saurik) [mailto:saurik@saurik.com]
Sent: Tuesday, December 04, 2001 2:50 AM
To: svn-dev
Subject: OK, so copy is supposed to work now? (as it still isn't, hehe)
 
OK, I just got and installed Subversion r590 (still using Apache 2.0b28,
the latest released beta. is that a problem?), and am trying to do a
copy:
 
.
 
I'm not really sure what else is of use to know for this one. (from what
I can tell, dav_svn_copy_resource isn't even being called, but I might
be misusing gdb).
Error 502 sounds freaky. gateway failure?
 
Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
Received on Sat Oct 21 14:36:51 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.