fix http auth with multiple curl handles
[gitweb.git] / http.c
diff --git a/http.c b/http.c
index 8ac8eb6c38e21bdb347f59ec41162270ebe82c04..c6dc9b778ed0dd10e710b742b7fe9df147cb2954 100644 (file)
--- a/http.c
+++ b/http.c
@@ -494,6 +494,8 @@ struct active_request_slot *get_active_slot(void)
        curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDS, NULL);
        curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0);
        curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
+       if (http_auth.password)
+               init_curl_http_auth(slot->curl);
 
        return slot;
 }
@@ -829,7 +831,7 @@ int http_get_strbuf(const char *url, struct strbuf *result, int options)
 }
 
 /*
- * Downloads an url and stores the result in the given file.
+ * Downloads a URL and stores the result in the given file.
  *
  * If a previous interrupted download is detected (i.e. a previous temporary
  * file is still around) the download is resumed.