8000 Merge branch 'support/2.7' into develop · generalstephen1/codebird-php@470b372 · GitHub
[go: up one dir, main page]

Skip to content

Commit 470b372

Browse files
committed
Merge branch 'support/2.7' into develop
# Conflicts: # CHANGELOG # bower.json # src/codebird.php
2 parents fa14f99 + 03045fe commit 470b372

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ codebird-php - changelog
99
+ #121 Allow for multiple parameters in templated methods
1010
by replacing preg_match with preg_match_all
1111

12+
2.7.1 (2015-08-16)
13+
+ #124 Download redirected remote images
14+
1215
2.7.0 (2015-05-14)
1316
- #92, #108 Fix issues with uploading special chars
1417
+ #109 Proxy support

src/codebird.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ protected function getCurlInitialization($url)
733733
protected function getNoCurlInitialization($url, $contextOptions, $hostname = '')
734734
{
735735
$httpOptions = [];
736-
736+
737737
$httpOptions['header'] = [
738738
'User-Agent: codebird-php/' . $this->getVersion() . ' +https://github.com/jublonet/codebird-php'
739739
];
@@ -1290,6 +1290,8 @@ protected function _getMultipartRequestFromParams($possible_files, $border, $par
12901290
// use hardcoded download timeouts for now
12911291
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 5000);
12921292
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 2000);
1293+
// find files that have been redirected
1294+
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
12931295
$result = curl_exec($ch);
12941296
if ($result !== false) {
12951297
$value = $result;

0 commit comments

Comments
 (0)
0