Skip to content

Commit

Permalink
Merge pull request #115 from longbai/7.0
Browse files Browse the repository at this point in the history
fixed json with charset
  • Loading branch information
longbai committed Feb 26, 2015
2 parents fdfd75e + 9a00a04 commit f67af3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ php:
- 5.5
- 5.6
before_script:
- export QINIU_ACCESS_KEY="QWYn5TFQsLLU1pL5MFEmX3s5DmHdUThav9WyOWOm"
- export QINIU_SECRET_KEY="Bxckh6FA-Fbs9Yt3i3cbKVK22UPBmAOHJcL95pGz"
- export QINIU_TEST_BUCKET="phpsdk"
- export QINIU_TEST_KEY="php-logo.png"
- export QINIU_TEST_ENV="travis"
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source --dev
Expand Down
3 changes: 2 additions & 1 deletion src/Qiniu/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public function needRetry()

private static function isJson($headers)
{
return isset($headers['Content-Type']) && $headers['Content-Type'] == 'application/json';
return isset($headers['Content-Type']) &&
strpos($headers['Content-Type'], 'application/json') === 0;
}
}
8 changes: 4 additions & 4 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

use Qiniu\Auth;

$accessKey = getenv('QINIU_ACCESS_KEY');
$secretKey = getenv('QINIU_SECRET_KEY');
$accessKey = 'QWYn5TFQsLLU1pL5MFEmX3s5DmHdUThav9WyOWOm';
$secretKey = 'Bxckh6FA-Fbs9Yt3i3cbKVK22UPBmAOHJcL95pGz';
$testAuth = new Auth($accessKey, $secretKey);
$bucketName = getenv('QINIU_TEST_BUCKET');
$key = getenv('QINIU_TEST_KEY');
$bucketName = 'phpsdk';
$key = 'php-logo.png';

$dummyAccessKey = 'abcdefghklmnopq';
$dummySecretKey = '1234567890';
Expand Down

0 comments on commit f67af3f

Please sign in to comment.