Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Case-insensitive HTTP header parsing#34

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
corasaurus-hex merged 1 commit intozencoder:masterfrommchristopher:master
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes fromall 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
4 changes: 2 additions & 2 deletionsServices/Zencoder.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -231,10 +231,10 @@ private function _processResponse($response)
if ( $status == 204 || (($status == 200 || $status == 201) && trim($body) == "")) {
return TRUE;
}
if (empty($headers['Content-Type'])) {
if (empty($headers['content-type'])) {
throw new Services_Zencoder_Exception('Response header is missing Content-Type', $body);
}
switch ($headers['Content-Type']) {
switch ($headers['content-type']) {
case 'application/json':
case 'application/json; charset=utf-8':
return $this->_processJsonResponse($status, $headers, $body);
Expand Down
3 changes: 2 additions & 1 deletionServices/Zencoder/Http.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -115,7 +115,8 @@ public function __call($name, $args) {
array_shift($header_lines);
foreach ($header_lines as $line) {
list($key, $value) = explode(":", $line, 2);
$headers[$key] = trim($value);
// Ensure headers are lowercase per https://tools.ietf.org/html/rfc2616#section-4.2
$headers[strtolower($key)] = trim($value);
}
curl_close($curl);
if (isset($buf) && is_resource($buf)) fclose($buf);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp