aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-01-09 04:28:42 +0100
committerjaubourg <j@ubourg.net>2011-01-09 04:28:42 +0100
commit69497c3fd7ff560be0e47b4c65076915cca756bc (patch)
treedb0b9a32600b201098d09c7ec5579cd5b7469235 /test/data
parent98c6c4b2b0afb2754883fc39c5626da3219e81e0 (diff)
downloadjquery-69497c3fd7ff560be0e47b4c65076915cca756bc.tar.gz
jquery-69497c3fd7ff560be0e47b4c65076915cca756bc.zip
Fixes #7881. Setting contentType to false will prevent the Content-Type header from being sent. Unit test added.
Diffstat (limited to 'test/data')
-rw-r--r--test/data/headers.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/data/headers.php b/test/data/headers.php
index c3cb72961..d500b16f4 100644
--- a/test/data/headers.php
+++ b/test/data/headers.php
@@ -6,15 +6,11 @@ $headers = array();
foreach( $_SERVER as $key => $value ) {
- if ( substr( $key , 0 , 5 ) == "HTTP_" ) {
-
- $key = str_replace( "_" , "-" , substr( $key , 5) );
- $headers[ $key ] = $value;
-
- }
+ $key = str_replace( "_" , "-" , substr( $key , 0 , 5 ) == "HTTP_" ? substr( $key , 5 ) : $key );
+ $headers[ $key ] = $value;
}
foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) {
- echo "$key: " . $headers[ strtoupper( $key ) ] . "\n";
+ echo "$key: " . @$headers[ strtoupper( $key ) ] . "\n";
}