- fix some tests on linux
[m6w6/ext-http] / tests / get_request_data_001.phpt
index 4b9437a8730c830bc654dc368df29b1beca3bab3..4d15265a3f90755cc17626a7cb03351cfed06252 100644 (file)
@@ -6,21 +6,31 @@ include 'skip.inc';
 ?>
 --ENV--
 HTTP_ACCEPT_CHARSET=iso-8859-1, *
+HTTP_ACCEPT_ENCODING=none
 HTTP_USER_AGENT=Mozilla/5.0
+HTTP_HOST=localhost
 --POST--
 a=b&c=d
 --FILE--
 <?php
 echo "-TEST\n";
-print_r(http_get_request_headers());
-var_dump(http_get_request_body());
+$h = http_get_request_headers();
+ksort($h);
+print_r($h);
+$b = http_get_request_body();
+if (php_sapi_name() == 'cli' || $b == 'a=b&c=d') {
+       echo "OK\n";
+}
 ?>
+===DONE===
 --EXPECTF--
 %sTEST
 Array
 (
     [Accept-Charset] => iso-8859-1, *
+    [Accept-Encoding] => none
+    [Host] => localhost
     [User-Agent] => Mozilla/5.0
 )
-string(7) "a=b&c=d"
-
+OK
+===DONE===