summaryrefslogtreecommitdiff
path: root/t/t5541-http-push.sh
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-04-08 02:15:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-10 04:16:11 (GMT)
commitd8fab07208abfbe7dc93aea97c5577cdd73266c5 (patch)
tree81bd5b86e323fc49f14e1ab749eba59989f6de3b /t/t5541-http-push.sh
parenteb9d47cf9b1cb36876df1cfd48ab57278729be6d (diff)
downloadgit-d8fab07208abfbe7dc93aea97c5577cdd73266c5.zip
git-d8fab07208abfbe7dc93aea97c5577cdd73266c5.tar.gz
git-d8fab07208abfbe7dc93aea97c5577cdd73266c5.tar.bz2
remote-curl: ensure that URLs have a trailing slash
Previously, we blindly assumed that URLs passed to the remote-curl helper did not end with a trailing slash. Use the convenience function end_url_with_slash() from http.[ch] to ensure that URLs have a trailing slash on invocation of the remote-curl helper, and use the URL as one with a trailing slash throughout. It is possible for users to pass a URL with a trailing slash to remote-curl, by, say, setting it in remote.<name>.url in their git config. The resulting requests have an empty path component (//) and may break implementations of the http git protocol. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5541-http-push.sh')
-rwxr-xr-xt/t5541-http-push.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 7873d94..f0c50d3 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -38,7 +38,7 @@ cat >exp <<EOF
GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200
EOF
-test_expect_failure 'no empty path components' '
+test_expect_success 'no empty path components' '
# In the URL, add a trailing slash, and see if git appends yet another
# slash.
cd "$ROOT_PATH" &&