Explorar el Código

ZF-9845: make Zend_Controller_Request_Http::getHeader() case-insensitive

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22212 44c647ce-9c0f-0410-b52a-842ac1e357ba
bradley.holt hace 15 años
padre
commit
7b4b34d93f
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      library/Zend/Controller/Request/Http.php

+ 6 - 0
library/Zend/Controller/Request/Http.php

@@ -990,6 +990,12 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
             if (!empty($headers[$header])) {
                 return $headers[$header];
             }
+            $header = strtolower($header);
+            foreach ($headers as $key => $value) {
+                if (strtolower($key) == $header) {
+                    return $value;
+                }
+            }
         }
 
         return false;