author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sat, 17 Jan 2009 15:11:51 +0000 (16:11 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 18 Jan 2009 02:19:46 +0000 (18:19 -0800) | ||
commit | 466ddf90c2f270b973d141f20e912f743743331c | |
tree | 0a238a1c9d8c2597874dd6b8ecfb243b5812f851 | tree | snapshot |
parent | 20642801e44a03362d1809644bf4da6473636529 | commit | diff |
http-push: when making directories, have a trailing slash in the path name
The function lock_remote() sends MKCOL requests to make leading
directories; However, if it does not put a forward slash '/' at the end of
the path, the server sends a 301 redirect.
By leaving the '/' in place, we can avoid this additional step.
Incidentally, at least one version of Curl (7.16.3) does not resend
credentials when it follows a 301 redirect, so this commit also fixes
a bug.
Original patch by Tay Ray Chuan <rctay89@gmail.com>.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The function lock_remote() sends MKCOL requests to make leading
directories; However, if it does not put a forward slash '/' at the end of
the path, the server sends a 301 redirect.
By leaving the '/' in place, we can avoid this additional step.
Incidentally, at least one version of Curl (7.16.3) does not resend
credentials when it follows a 301 redirect, so this commit also fixes
a bug.
Original patch by Tay Ray Chuan <rctay89@gmail.com>.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c | diff | blob | history | |
t/lib-httpd/apache.conf | diff | blob | history | |
t/t5540-http-push.sh | diff | blob | history |