Skip to content

regain compatibility with http2 lowercased header keys #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
regain compatibility with http2 lowercased header keys, available sin…
…ce PHP7.1
  • Loading branch information
slengyel-lnx committed Feb 14, 2019
commit a39dd547dd9eb5414e10191d93df246b6bdf61a8
6 changes: 5 additions & 1 deletion Services/Zencoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ private function _processResponse($response)
return TRUE;
}
if (empty($headers['Content-Type'])) {
throw new Services_Zencoder_Exception('Response header is missing Content-Type', $body);
if (empty($headers['content-type'])) {
throw new Services_Zencoder_Exception('Response header is missing Content-Type', $body);
} else {
$headers['Content-Type'] = $headers['content-type'];
}
}
switch ($headers['Content-Type']) {
case 'application/json':
Expand Down