]> git.ipfire.org Git - thirdparty/git.git/commit - http-push.c
http-push: support full URI in handle_remote_ls_ctx()
authorKirill A. Korinskiy <catap@catap.ru>
Tue, 23 Dec 2008 08:31:15 +0000 (11:31 +0300)
committerJunio C Hamano <gitster@pobox.com>
Thu, 25 Dec 2008 06:57:12 +0000 (22:57 -0800)
commite1f33efe07b9a520505fccd71bea1292fc9448dd
treeece1e42ae46334737bc6d54af5a3b26588115a4c
parent8104ebfe8276657ee803cca7eb8665a78cf3ef83
http-push: support full URI in handle_remote_ls_ctx()

The program calls remote_ls() to get list of files from the server over
HTTP; handle_remote_ls_ctx() is used to parse its response to populate
"struct remote_ls_ctx" that is returned from remote_ls().

The handle_remote_ls_ctx() function assumed that the server returns a
local path in href field, but RFC 4918 (14.7) demand of support full URI
(e.g. "http://localhost:8080/repo.git").

This resulted in push failure (e.g. git-http-push issues a PROPFIND
request to "/repo.git/alhost:8080/repo.git/refs/" to the server).

Signed-off-by: Kirill A. Korinskiy <catap@catap.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c