Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit e1f1eba

Browse files
committed
Enabling the follow location option for cURL
1 parent adbfced commit e1f1eba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Facebook/HttpClients/FacebookCurlHttpClient.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public function openConnection($url, $method, $body, array $headers, $timeOut)
9898
CURLOPT_URL => $url,
9999
CURLOPT_CONNECTTIMEOUT => 10,
100100
CURLOPT_TIMEOUT => $timeOut,
101-
CURLOPT_RETURNTRANSFER => true, // Follow 301 redirects
101+
CURLOPT_RETURNTRANSFER => true, // Return response as string
102+
CURLOPT_FOLLOWLOCATION => true, // Follow 30x redirects
102103
CURLOPT_HEADER => true, // Enable header processing
103104
CURLOPT_SSL_VERIFYHOST => 2,
104105
CURLOPT_SSL_VERIFYPEER => true,

0 commit comments

Comments
 (0)