From c20aaf1ad69c7ac5a970c60a8d0e25eaa12a2614 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 31 Jan 2019 17:25:43 -0100 Subject: [PATCH] allow FOLLOWLOCATION Signed-off-by: Maxence Lange --- lib/Service/CurlService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Service/CurlService.php b/lib/Service/CurlService.php index f9554670..923596d1 100644 --- a/lib/Service/CurlService.php +++ b/lib/Service/CurlService.php @@ -274,6 +274,8 @@ class CurlService { curl_setopt($curl, CURLOPT_BINARYTRANSFER, $request->isBinary()); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + $this->maxDownloadSize = $this->configService->getAppValue(ConfigService::SOCIAL_MAX_SIZE) * (1024 * 1024); curl_setopt($curl, CURLOPT_BUFFERSIZE, 128); @@ -399,6 +401,7 @@ class CurlService { } } + /** * @param int $code * @param Request $request