1
0
Fork 0

Resolve options when creating requests to fix 5.3 build

pull/8762/head
Jordi Boggiano 2020-04-10 12:24:43 +02:00
parent 4cb74d33e6
commit 40a35abb94
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 3 deletions

View File

@ -129,6 +129,8 @@ class HttpDownloader
private function addJob($request, $sync = false) private function addJob($request, $sync = false)
{ {
$request['options'] = array_replace_recursive($this->options, $request['options']);
$job = array( $job = array(
'id' => $this->idGen++, 'id' => $this->idGen++,
'status' => self::STATUS_QUEUED, 'status' => self::STATUS_QUEUED,
@ -155,7 +157,6 @@ class HttpDownloader
// start job // start job
$url = $job['request']['url']; $url = $job['request']['url'];
$options = $job['request']['options']; $options = $job['request']['options'];
$options = array_replace_recursive($this->options, $options);
$job['status'] = HttpDownloader::STATUS_STARTED; $job['status'] = HttpDownloader::STATUS_STARTED;
@ -237,8 +238,6 @@ class HttpDownloader
return; return;
} }
$options = array_replace_recursive($this->options, $options);
if ($job['request']['copyTo']) { if ($job['request']['copyTo']) {
$this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']); $this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']);
} else { } else {