diff --git a/LICENSE b/LICENSE index d29b095..df7f6ea 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Software License Agreement (The BSD 3-Clause License) -Copyright (c) 2012, Michael K. Squires +Copyright (c) 2017, Michael K. Squires All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/library/Phue/Transport/Http.php b/library/Phue/Transport/Http.php index 2693cee..a27f0f7 100644 --- a/library/Phue/Transport/Http.php +++ b/library/Phue/Transport/Http.php @@ -227,7 +227,7 @@ protected function getJsonResponse($address, $method = self::METHOD_GET, \stdCla $contentType = $this->getAdapter()->getContentType(); // Throw connection exception if status code isn't 200 or wrong content type - if ($status != 200 || $contentType != 'application/json') { + if ($status != 200 || explode(';', $contentType)[0] != 'application/json') { throw new ConnectionException('Connection failure'); }