mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 04:57:46 +02:00
fix(import-with-escaped-characters): remove \CodeIgniter\HTTP\URI in download_file, closes #103
This commit is contained in:
parent
15180d2265
commit
35b5be095f
1 changed files with 2 additions and 4 deletions
|
|
@ -45,9 +45,8 @@ function download_file($fileUrl)
|
||||||
var_dump($fileUrl);
|
var_dump($fileUrl);
|
||||||
|
|
||||||
$client = \Config\Services::curlrequest();
|
$client = \Config\Services::curlrequest();
|
||||||
$uri = new \CodeIgniter\HTTP\URI($fileUrl);
|
|
||||||
|
|
||||||
$response = $client->get($uri, [
|
$response = $client->get($fileUrl, [
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'User-Agent' => 'Castopod/' . CP_VERSION,
|
'User-Agent' => 'Castopod/' . CP_VERSION,
|
||||||
],
|
],
|
||||||
|
|
@ -72,8 +71,7 @@ function download_file($fileUrl)
|
||||||
$newFileUrl = (string) trim(
|
$newFileUrl = (string) trim(
|
||||||
$response->getHeader('location')->getValue(),
|
$response->getHeader('location')->getValue(),
|
||||||
);
|
);
|
||||||
$newLocation = new \CodeIgniter\HTTP\URI($newFileUrl);
|
$response = $client->get($newFileUrl, [
|
||||||
$response = $client->get($newLocation, [
|
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'User-Agent' => 'Castopod/' . CP_VERSION,
|
'User-Agent' => 'Castopod/' . CP_VERSION,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue