Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 1dfe980

Browse files
committed
Merge pull request zendframework/zendframework#3403 branch 'hotfix/zf8825'
2 parents bda63b8 + 1aae024 commit 1dfe980

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/PhpEnvironment/Request.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,12 @@ public function setServer(ParametersInterface $server)
206206
// This seems to be the only way to get the Authorization header on Apache
207207
if (function_exists('apache_request_headers')) {
208208
$apacheRequestHeaders = apache_request_headers();
209-
if (!isset($this->serverParams['HTTP_AUTHORIZATION'])
210-
&& isset($apacheRequestHeaders['Authorization'])
211-
) {
212-
$this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['Authorization']);
209+
if (!isset($this->serverParams['HTTP_AUTHORIZATION'])) {
210+
if (isset($apacheRequestHeaders['Authorization'])) {
211+
$this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['Authorization']);
212+
} elseif (isset($apacheRequestHeaders['authorization'])) {
213+
$this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['authorization']);
214+
}
213215
}
214216
}
215217

0 commit comments

Comments
 (0)