Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Some HTTP headers missing in CGI environment #477

Closed
wants to merge 1 commit into from
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
6 changes: 4 additions & 2 deletions library/Zend/Controller/Request/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,10 @@ public function getHeader($header)
}

// Try to get it from the $_SERVER array first
$temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));
if (isset($_SERVER[$temp])) {
$temp = strtoupper(str_replace('-', '_', $header));
if (isset($_SERVER['HTTP_' . $temp])) {
return $_SERVER['HTTP_' . $temp];
} else if /* CGI env */ (isset($_SERVER[$temp]) && in_array($temp, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) {
return $_SERVER[$temp];
}

Expand Down