| OLD | NEW |
| (Empty) |
| 1 <?php | |
| 2 // This is a compat shim to make our php-cgi act more like apache mod_php. | |
| 3 // http://www.qijoo.com/fapm/PHP/en/function.getallheaders.html | |
| 4 // Well, sort of, lighttpd gives us headers like HTTP_UPPERCASE_WEE, and so | |
| 5 // we do some ugly php to make that Uppercase-Wee... | |
| 6 function getallheaders() { | |
| 7 foreach($_SERVER as $name => $value) { | |
| 8 if(substr($name, 0, 5) == 'HTTP_') { | |
| 9 $name = strtolower(substr($name, 5)); | |
| 10 $name = join("-", array_map('ucwords', explode("_", $name))); | |
| 11 $headers[$name] = $value; | |
| 12 } | |
| 13 } | |
| 14 return $headers; | |
| 15 } | |
| 16 ?> | |
| OLD | NEW |