Skip to content

Commit

Permalink
Merge branch 'support/2.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetx committed Aug 17, 2015
2 parents 17794e7 + 03045fe commit ba5013f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
codebird-php - changelog
========================

2.7.1 (2015-08-16)
+ #124 Download redirected remote images

2.7.0 (2015-05-14)
- #92, #108 Fix issues with uploading special chars
+ #109 Proxy support
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codebird-php",
"version": "2.7.0",
"version": "2.7.1",
"homepage": "http://www.jublo.net/projects/codebird/php",
"authors": [
"Joshua Atkins <[email protected]>",
Expand Down
8 changes: 5 additions & 3 deletions src/codebird.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* A Twitter library in PHP.
*
* @package codebird
* @version 2.7.0
* @version 2.7.1
* @author Jublo Solutions <[email protected]>
* @copyright 2010-2015 Jublo Solutions <[email protected]>
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0
Expand Down Expand Up @@ -104,7 +104,7 @@ class Codebird
/**
* The current Codebird version
*/
protected $_version = '2.7.0';
protected $_version = '2.7.1';

/**
* Auto-detect cURL absence
Expand Down Expand Up @@ -716,7 +716,7 @@ protected function getCurlInitialization($url)
protected function getNoCurlInitialization($url, $contextOptions, $hostname = '')
{
$httpOptions = array();

$httpOptions['header'] = array(
'User-Agent: codebird-php ' . $this->getVersion() . ' by Jublo Solutions <[email protected]>'
);
Expand Down Expand Up @@ -1269,6 +1269,8 @@ protected function _buildMultipart($method, $params)
// use hardcoded download timeouts for now
curl_setopt($ch, _CURLOPT_TIMEOUT_MS, 5000);
curl_setopt($ch, _CURLOPT_CONNECTTIMEOUT_MS, 2000);
// find files that have been redirected
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
if ($result !== false) {
$value = $result;
Expand Down

0 comments on commit ba5013f

Please sign in to comment.