fix http auth with multiple curl handles
commitdfa1725a3ec57098637b698ffc2b2e2459acc518
authorJeff King <peff@peff.net>
Tue, 10 Apr 2012 09:53:40 +0000 (10 11:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Apr 2012 16:12:13 +0000 (10 09:12 -0700)
treecd60c4d5053081b20956bc14158b402ec60028c6
parent5a9681f46aa9e152f32e76d7ade9d4c11313f99a
fix http auth with multiple curl handles

HTTP authentication is currently handled by get_refs and fetch_ref, but
not by fetch_object, fetch_pack or fetch_alternates. In the
single-threaded case, this is not an issue, since get_refs is always
called first. It recognigzes the 401 and prompts the user for
credentials, which will then be used subsequently.

If the curl multi interface is used, however, only the multi handle used
by get_refs will have credentials configured. Requests made by other
handles fail with an authentication error.

Fix this by setting CURLOPT_USERPWD whenever a slot is requested.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c
t/t5550-http-fetch.sh