Skip to content

Commit 5119a58

Browse files
authored
Merge pull request #127 from mejenborg/master
Support charset definition in Content-Type header
2 parents e668f9b + cf198e9 commit 5119a58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/Phue/Transport/Http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ protected function getJsonResponse($address, $method = self::METHOD_GET, \stdCla
227227
$contentType = $this->getAdapter()->getContentType();
228228

229229
// Throw connection exception if status code isn't 200 or wrong content type
230-
if ($status != 200 || $contentType != 'application/json') {
230+
if ($status != 200 || explode(';', $contentType)[0] != 'application/json') {
231231
throw new ConnectionException('Connection failure');
232232
}
233233

0 commit comments

Comments
 (0)