Removed non-standard (and not that useful) xhr emulation methods & reworked the heade...
[jquery.git] / test / data / headers.request.php
1 <?php
2
3 if (!function_exists('apache_request_headers')) { 
4         function apache_request_headers() { 
5                 foreach($_SERVER as $key=>$value) { 
6                         if (substr($key,0,5)=="HTTP_") { 
7                                 $key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5))))); 
8                                 $out[$key]=$value; 
9                         }else{ 
10                                 $out[$key]=$value; 
11                         } 
12                 } 
13                 return $out; 
14         } 
15
16
17 $headers = apache_request_headers();
18
19 foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) {
20         echo "$key: $headers[$key]\n";
21 }