author | Tay Ray Chuan <rctay89@gmail.com> | |
Thu, 8 Apr 2010 02:15:18 +0000 (10:15 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 10 Apr 2010 04:16:11 +0000 (21:16 -0700) | ||
commit | d8fab07208abfbe7dc93aea97c5577cdd73266c5 | |
tree | 81bd5b86e323fc49f14e1ab749eba59989f6de3b | tree | snapshot |
parent | eb9d47cf9b1cb36876df1cfd48ab57278729be6d | commit | diff |
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>
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>
remote-curl.c | diff | blob | history | |
t/t5541-http-push.sh | diff | blob | history |