diff options
author | jaubourg <aubourg.julian@gmail.com> | 2010-12-11 02:41:39 +0100 |
---|---|---|
committer | jaubourg <aubourg.julian@gmail.com> | 2010-12-11 02:41:39 +0100 |
commit | 974637d639a06a050e11d87677d1c1c80bed709d (patch) | |
tree | 18fb66d94d10ee083e5b70b0c6ac4c191afe80e7 /test/data/headers.php | |
parent | 0b0889ceaaafb1fe37a87b14476066b8f9e93ce9 (diff) | |
download | jquery-974637d639a06a050e11d87677d1c1c80bed709d.tar.gz jquery-974637d639a06a050e11d87677d1c1c80bed709d.zip |
Simplified headers tests: removed multiline headers (support is far too servers & browsers dependant) and made all the tests in a single request.
Diffstat (limited to 'test/data/headers.php')
-rw-r--r-- | test/data/headers.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/test/data/headers.php b/test/data/headers.php index 598cadcde..f2c21c0cc 100644 --- a/test/data/headers.php +++ b/test/data/headers.php @@ -1,5 +1,20 @@ <?php -header( "Multiple-Line: Hello\n World" ); -header( "Multiple-Multiple-Line: Hello\n Beautiful\n\t World" ); -header( "Single-Line: Hello World" );
\ No newline at end of file +header( "Sample-Header: Hello World" ); + +$headers = array(); + +foreach( $_SERVER as $key => $value ) { + + if ( substr( $key , 0 , 5 ) == "HTTP_" ) { + + $key = str_replace( "_" , "-" , substr( $key , 5) ); + $headers[ $key ] = $value; + + } + +} + +foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) { + echo "$key: " . $headers[ strtoupper( $key ) ] . "\n"; +} |