From 4cb74d33e6b1e4be6a1c36a0bb50f33a26513f0f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 10 Apr 2020 12:10:30 +0200 Subject: [PATCH] Forward default HttpDownloader options to RemoteFilesystem/CurlDownloader, fixes #8757 --- src/Composer/Util/HttpDownloader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Util/HttpDownloader.php b/src/Composer/Util/HttpDownloader.php index 8a117a232..26c181a00 100644 --- a/src/Composer/Util/HttpDownloader.php +++ b/src/Composer/Util/HttpDownloader.php @@ -155,6 +155,7 @@ class HttpDownloader // start job $url = $job['request']['url']; $options = $job['request']['options']; + $options = array_replace_recursive($this->options, $options); $job['status'] = HttpDownloader::STATUS_STARTED; @@ -236,6 +237,8 @@ class HttpDownloader return; } + $options = array_replace_recursive($this->options, $options); + if ($job['request']['copyTo']) { $this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']); } else {