Resolve options when creating requests to fix 5.3 build
parent
4cb74d33e6
commit
40a35abb94
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue