[ServerBag] Skip unnecessary loop in getHeaders()
This commit is contained in:
parent
755e0d4a37
commit
542cfd62df
@ -26,11 +26,8 @@ class ServerBag extends ParameterBag
|
||||
if ('HTTP_' === substr($key, 0, 5)) {
|
||||
$headers[substr($key, 5)] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
// CONTENT_TYPE and CONTENT_LENGTH are not prefixed with HTTP_
|
||||
foreach (array('CONTENT_TYPE', 'CONTENT_LENGTH') as $key) {
|
||||
if (isset($this->parameters[$key])) {
|
||||
// CONTENT_* are not prefixed with HTTP_
|
||||
elseif (in_array($key, array('CONTENT_LENGTH', 'CONTENT_MD5', 'CONTENT_TYPE'))) {
|
||||
$headers[$key] = $this->parameters[$key];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user