Add REMOTE_ADDR to getHeader

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2018-10-25 22:26:49 +02:00
parent 6ad7f32938
commit 986f4df2a5
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
1 changed files with 6 additions and 2 deletions

View File

@ -320,14 +320,18 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// There's a few headers that seem to end up in the top-level
// server array.
switch($name) {
switch ($name) {
case 'CONTENT_TYPE' :
case 'CONTENT_LENGTH' :
if (isset($this->server[$name])) {
return $this->server[$name];
}
break;
case 'REMOTE_ADDR' :
if (isset($this->server[$name])) {
return $this->server[$name];
}
break;
}
return '';