diff options
author | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
commit | 2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch) | |
tree | 33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /sapi/cgi/tests | |
parent | 3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff) | |
download | php-git-php-5.3.0alpha2.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'sapi/cgi/tests')
-rw-r--r-- | sapi/cgi/tests/010.phpt | 53 | ||||
-rw-r--r-- | sapi/cgi/tests/011.phpt | 165 |
2 files changed, 0 insertions, 218 deletions
diff --git a/sapi/cgi/tests/010.phpt b/sapi/cgi/tests/010.phpt deleted file mode 100644 index e633ad28ba..0000000000 --- a/sapi/cgi/tests/010.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -Bug #45860 (header() function fails to correctly replace all Status lines) ---SKIPIF-- -<?php include "skipif.inc"; ?> ---FILE-- -<?php - -include "include.inc"; - -$php = get_cgi_path(); -reset_env_vars(); - -$f = tempnam(sys_get_temp_dir(), 'cgitest'); - -putenv("TRANSLATED_PATH=".$f."/x"); -putenv("SCRIPT_FILENAME=".$f."/x"); -file_put_contents($f, '<?php -header("HTTP/1.1 403 Forbidden"); -header("Status: 403 Also Forbidden"); -?>'); - -echo (`$php -n $f`); - -file_put_contents($f, '<?php -header("HTTP/1.1 403 Forbidden"); -?>'); - -echo (`$php -n $f`); - -file_put_contents($f, '<?php -header("Status: 403 Also Forbidden"); -?>'); - -echo (`$php -n $f`); - -echo "Done\n"; - -@unlink($f); -?> ---EXPECTF-- -Status: 403 Forbidden -X-Powered-By: PHP/%s -Content-type: text/html - -Status: 403 Forbidden -X-Powered-By: PHP/%s -Content-type: text/html - -X-Powered-By: PHP/%s -Status: 403 Also Forbidden -Content-type: text/html - -Done diff --git a/sapi/cgi/tests/011.phpt b/sapi/cgi/tests/011.phpt deleted file mode 100644 index 177df021a6..0000000000 --- a/sapi/cgi/tests/011.phpt +++ /dev/null @@ -1,165 +0,0 @@ ---TEST-- -header_remove() ---SKIPIF-- -<?php include "skipif.inc"; ?> ---FILE-- -<?php - -include "include.inc"; - -$php = get_cgi_path(); -reset_env_vars(); - -$f = tempnam(sys_get_temp_dir(), 'cgitest'); - -function test($script) { - file_put_contents($GLOBALS['f'], $script); - $cmd = escapeshellcmd($GLOBALS['php']); - $cmd .= ' -n -dreport_zend_debug=0 -dhtml_errors=0 ' . escapeshellarg($GLOBALS['f']); - echo "----------\n"; - echo rtrim($script) . "\n"; - echo "----------\n"; - passthru($cmd); -} - -test('<?php ?>'); -test('<?php header_remove(); ?>'); -test('<?php header_remove("X-Foo"); ?>'); -test('<?php -header("X-Foo: Bar"); -?>'); -test('<?php -header("X-Foo: Bar"); -header("X-Bar: Baz"); -header_remove("X-Foo"); -?>'); -test('<?php -header("X-Foo: Bar"); -header_remove("X-Foo: Bar"); -?>'); -test('<?php -header("X-Foo: Bar"); -header_remove("X-Foo:"); -?>'); -test('<?php -header("X-Foo: Bar"); -header_remove(); -?>'); -test('<?php -header_remove(""); -?>'); -test('<?php -header_remove(":"); -?>'); -test('<?php -header("X-Foo: Bar"); -echo "flush\n"; -flush(); -header_remove("X-Foo"); -?>'); - -@unlink($f); -?> ---EXPECTF-- ----------- -<?php ?> ----------- -X-Powered-By: PHP/%s -Content-type: text/html - ----------- -<?php header_remove(); ?> ----------- -Content-type: text/html - ----------- -<?php header_remove("X-Foo"); ?> ----------- -X-Powered-By: PHP/%s -Content-type: text/html - ----------- -<?php -header("X-Foo: Bar"); -?> ----------- -X-Powered-By: PHP/%s -X-Foo: Bar -Content-type: text/html - ----------- -<?php -header("X-Foo: Bar"); -header("X-Bar: Baz"); -header_remove("X-Foo"); -?> ----------- -X-Powered-By: PHP/%s -X-Bar: Baz -Content-type: text/html - ----------- -<?php -header("X-Foo: Bar"); -header_remove("X-Foo: Bar"); -?> ----------- -X-Powered-By: PHP/%s -X-Foo: Bar -Content-type: text/html - - -Warning: Header to delete may not contain colon. in %s on line 3 ----------- -<?php -header("X-Foo: Bar"); -header_remove("X-Foo:"); -?> ----------- -X-Powered-By: PHP/%s -X-Foo: Bar -Content-type: text/html - - -Warning: Header to delete may not contain colon. in %s on line 3 ----------- -<?php -header("X-Foo: Bar"); -header_remove(); -?> ----------- -Content-type: text/html - ----------- -<?php -header_remove(""); -?> ----------- -X-Powered-By: PHP/%s -Content-type: text/html - ----------- -<?php -header_remove(":"); -?> ----------- -X-Powered-By: PHP/%s -Content-type: text/html - - -Warning: Header to delete may not contain colon. in %s on line 2 ----------- -<?php -header("X-Foo: Bar"); -echo "flush\n"; -flush(); -header_remove("X-Foo"); -?> ----------- -X-Powered-By: PHP/%s -X-Foo: Bar -Content-type: text/html - -flush - -Warning: Cannot modify header information - headers already sent by (output started at %s:3) in %s on line 5 |