diff --git a/Services/Zencoder.php b/Services/Zencoder.php index ba8e209..b0b6537 100644 --- a/Services/Zencoder.php +++ b/Services/Zencoder.php @@ -231,9 +231,16 @@ private function _processResponse($response) if ( $status == 204 || (($status == 200 || $status == 201) && trim($body) == "")) { return TRUE; } + + // http/1.0 and http/1.1 if (empty($headers['Content-Type'])) { - throw new Services_Zencoder_Exception('Response header is missing Content-Type', $body); + // http/2 + if (empty($headers['content-type'])) { + throw new Services_Zencoder_Exception('Response header is missing Content-Type', $body); + } + $headers['Content-Type'] = $headers['content-type']; } + switch ($headers['Content-Type']) { case 'application/json': case 'application/json; charset=utf-8': diff --git a/composer.json b/composer.json index 32bfcb8..c8fcfdd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "zencoder/zencoder-php", - "homepage": "http://github.com/zencoder/zencoder-php", + "homepage": "https://github.com/zencoder/zencoder-php", "description":"Zencoder integration library for PHP", "keywords":["zencoder", "encoding", "encoder", "cloud"], "type":"library", @@ -16,7 +16,7 @@ "authors":[ { "name":"Zencoder", - "homepage":"http://zencoder.com/" + "homepage":"https://zencoder.com/" } ] }