diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php --- a/src/aphront/AphrontRequest.php +++ b/src/aphront/AphrontRequest.php @@ -931,13 +931,14 @@ } } - foreach ($headers as $header) { - list($key, $value) = $header; - switch ($key) { - case 'Host': - case 'Authorization': + foreach ($headers as $header_key => $header) { + list($header_head, $header_body) = $header; + $header_head = phutil_utf8_strtolower($header_head); + switch ($header_head) { + case 'host': + case 'authorization': // Don't forward these headers, we've already handled them elsewhere. - unset($headers[$key]); + unset($headers[$header_key]); break; default: break;