Skip to content
Snippets Groups Projects
Commit 35b5be09 authored by Benjamin Bellamy's avatar Benjamin Bellamy :speech_balloon:
Browse files

fix(import-with-escaped-characters): remove \CodeIgniter\HTTP\URI in download_file, closes #103

parent 15180d22
No related branches found
No related tags found
1 merge request!1WIP: German translation
......@@ -45,9 +45,8 @@ function download_file($fileUrl)
var_dump($fileUrl);
$client = \Config\Services::curlrequest();
$uri = new \CodeIgniter\HTTP\URI($fileUrl);
$response = $client->get($uri, [
$response = $client->get($fileUrl, [
'headers' => [
'User-Agent' => 'Castopod/' . CP_VERSION,
],
......@@ -72,8 +71,7 @@ function download_file($fileUrl)
$newFileUrl = (string) trim(
$response->getHeader('location')->getValue(),
);
$newLocation = new \CodeIgniter\HTTP\URI($newFileUrl);
$response = $client->get($newLocation, [
$response = $client->get($newFileUrl, [
'headers' => [
'User-Agent' => 'Castopod/' . CP_VERSION,
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment