Author: kameshj
Date: Mon Apr 4 12:55:38 2011
New Revision: 1088602
URL: http://svn.apache.org/viewvc?rev=1088602&view=rev
Log:
Fix the regression issue triggered by r917523.
The revision r917523 do some url encodings to the paths and uris which are
not url-encoded. But there is one additional url-encoding of an uri which is
already encoded. With this extra encoding, committing a path to slave which has
space in it fails.
* subversion/tests/cmdline/dav-mirror-autocheck.sh
Add a testcase for a regression issue triggered by r917523.
* subversion/mod_dav_svn/mirror.c
(dav_svn__location_header_filter): Remove redundant url-encoding of new_uri.
Patch by: Vijayaguru G <vijay{_AT_}collab.net>
Modified:
subversion/trunk/subversion/mod_dav_svn/mirror.c
subversion/trunk/subversion/tests/cmdline/dav-mirror-autocheck.sh
Modified: subversion/trunk/subversion/mod_dav_svn/mirror.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/mirror.c?rev=1088602&r1=1088601&r2=1088602&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/mirror.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/mirror.c Mon Apr 4 12:55:38 2011
@@ -241,7 +241,6 @@ apr_status_t dav_svn__location_header_fi
dav_svn__get_root_dir(r), "/",
start_foo, (char *)NULL),
r);
- new_uri = svn_path_uri_encode(new_uri, r->pool);
apr_table_set(r->headers_out, "Location", new_uri);
}
return ap_pass_brigade(f->next, bb);
Modified: subversion/trunk/subversion/tests/cmdline/dav-mirror-autocheck.sh
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/dav-mirror-autocheck.sh?rev=1088602&r1=1088601&r2=1088602&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/dav-mirror-autocheck.sh (original)
+++ subversion/trunk/subversion/tests/cmdline/dav-mirror-autocheck.sh Mon Apr
4 12:55:38 2011
@@ -416,10 +416,6 @@ $svnmucc rm "$BASE_URL/branch" cp 2 "$BA
say "svn log on $BASE_URL : "
$SVN --username jrandom --password rayjandom log -vq "$BASE_URL"
-# shut it down
-echo -n "${SCRIPT}: stopping httpd: "
-$HTTPD -f $HTTPD_CONFIG -k stop
-echo "."
# verify result: should be at rev 4 in both repos
# FIXME: do more rigorous verification here
@@ -438,5 +434,29 @@ fi
say "PASS: master, slave are both at r4, as expected"
-exit 0
+# The following test case is for the regression issue triggered by r917523.
+# The revision r917523 do some url encodings to the paths and uris which are
+# not url-encoded. But there is one additional url-encoding of an uri which is
+# already encoded. With this extra encoding, committing a path to slave which
+# has space in it fails. Please see this thread
+# http://svn.haxx.se/dev/archive-2011-03/0641.shtml for more info.
+
+say "Test case for regression issue triggered by r917523"
+
+$svnmucc cp 2 "$BASE_URL/trunk" "$BASE_URL/branch new"
+$svnmucc put /dev/null "$BASE_URL/branch new/file" \
+--config-option servers:global:http-library=neon
+RETVAL=$?
+
+if [ $RETVAL -eq 0 ] ; then
+ say "PASS: committing a path which has space in it passes"
+else
+ say "FAIL: committing a path which has space in it fails as there are extra
+ url-encodings happening in server side"
+fi
+# shut it down
+echo -n "${SCRIPT}: stopping httpd: "
+$HTTPD -f $HTTPD_CONFIG -k stop
+echo "."
+exit 0