@@ -4529,16 +4529,14 @@ private function parseParams(String $query = null)
4529
4529
parse_str ($ query , $ this ->params );
4530
4530
}
4531
4531
4532
- private function parseHeaders (array $ headers = null , bool $ parse = false )
4532
+ private function parseHeaders (array $ headers = null )
4533
4533
{
4534
4534
if (!$ headers ) {
4535
4535
$ headers = array ();
4536
- if ($ parse ) {
4537
- foreach ($ _SERVER as $ name => $ value ) {
4538
- if (substr ($ name , 0 , 5 ) == 'HTTP_ ' ) {
4539
- $ key = str_replace (' ' , '- ' , ucwords (strtolower (str_replace ('_ ' , ' ' , substr ($ name , 5 )))));
4540
- $ headers [$ key ] = $ value ;
4541
- }
4536
+ foreach ($ _SERVER as $ name => $ value ) {
4537
+ if (substr ($ name , 0 , 5 ) == 'HTTP_ ' ) {
4538
+ $ key = str_replace (' ' , '- ' , ucwords (strtolower (str_replace ('_ ' , ' ' , substr ($ name , 5 )))));
4539
+ $ headers [$ key ] = $ value ;
4542
4540
}
4543
4541
}
4544
4542
}
@@ -4608,11 +4606,6 @@ public function getHeader(String $key): String
4608
4606
{
4609
4607
if (isset ($ this ->headers [$ key ])) {
4610
4608
return $ this ->headers [$ key ];
4611
- } else {
4612
- $ serverKey = 'HTTP_ ' . strtoupper (str_replace ('_ ' , '- ' , $ key ));
4613
- if (isset ($ _SERVER [$ serverKey ])) {
4614
- return $ _SERVER [$ serverKey ];
4615
- }
4616
4609
}
4617
4610
return '' ;
4618
4611
}
0 commit comments