|
6 | 6 | * A Twitter library in PHP. |
7 | 7 | * |
8 | 8 | * @package codebird |
9 | | - * @version 2.7.0 |
| 9 | + * @version 2.7.1 |
10 | 10 | * @author Jublo Solutions <support@jublo.net> |
11 | 11 | * @copyright 2010-2015 Jublo Solutions <support@jublo.net> |
12 | 12 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0 |
@@ -104,7 +104,7 @@ class Codebird |
104 | 104 | /** |
105 | 105 | * The current Codebird version |
106 | 106 | */ |
107 | | - protected $_version = '2.7.0'; |
| 107 | + protected $_version = '2.7.1'; |
108 | 108 |
|
109 | 109 | /** |
110 | 110 | * Auto-detect cURL absence |
@@ -716,7 +716,7 @@ protected function getCurlInitialization($url) |
716 | 716 | protected function getNoCurlInitialization($url, $contextOptions, $hostname = '') |
717 | 717 | { |
718 | 718 | $httpOptions = array(); |
719 | | - |
| 719 | + |
720 | 720 | $httpOptions['header'] = array( |
721 | 721 | 'User-Agent: codebird-php ' . $this->getVersion() . ' by Jublo Solutions <support@jublo.net>' |
722 | 722 | ); |
@@ -1269,6 +1269,8 @@ protected function _buildMultipart($method, $params) |
1269 | 1269 | // use hardcoded download timeouts for now |
1270 | 1270 | curl_setopt($ch, _CURLOPT_TIMEOUT_MS, 5000); |
1271 | 1271 | curl_setopt($ch, _CURLOPT_CONNECTTIMEOUT_MS, 2000); |
| 1272 | + // find files that have been redirected |
| 1273 | + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
1272 | 1274 | $result = curl_exec($ch); |
1273 | 1275 | if ($result !== false) { |
1274 | 1276 | $value = $result; |
|
0 commit comments