Annotation of embedaddon/php/sapi/cgi/tests/010.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #45860 (header() function fails to correctly replace all Status lines)
        !             3: --SKIPIF--
        !             4: <?php include "skipif.inc"; ?>
        !             5: --FILE--
        !             6: <?php
        !             7: 
        !             8: include "include.inc";
        !             9: 
        !            10: $php = get_cgi_path();
        !            11: reset_env_vars();
        !            12: 
        !            13: $f = tempnam(sys_get_temp_dir(), 'cgitest');
        !            14: 
        !            15: putenv("TRANSLATED_PATH=".$f."/x");
        !            16: putenv("SCRIPT_FILENAME=".$f."/x");
        !            17: file_put_contents($f, '<?php
        !            18: header("HTTP/1.1 403 Forbidden");
        !            19: header("Status: 403 Also Forbidden");
        !            20: ?>');
        !            21: 
        !            22: echo (`$php -n $f`);
        !            23: 
        !            24: file_put_contents($f, '<?php
        !            25: header("HTTP/1.1 403 Forbidden");
        !            26: ?>');
        !            27: 
        !            28: echo (`$php -n $f`);
        !            29: 
        !            30: file_put_contents($f, '<?php
        !            31: header("Status: 403 Also Forbidden");
        !            32: ?>');
        !            33: 
        !            34: echo (`$php -n $f`);
        !            35: 
        !            36: echo "Done\n";
        !            37: 
        !            38: @unlink($f);
        !            39: ?>
        !            40: --EXPECTF--
        !            41: Status: 403 Forbidden
        !            42: X-Powered-By: PHP/%s
        !            43: Content-type: text/html
        !            44: 
        !            45: Status: 403 Forbidden
        !            46: X-Powered-By: PHP/%s
        !            47: Content-type: text/html
        !            48: 
        !            49: X-Powered-By: PHP/%s
        !            50: Status: 403 Also Forbidden
        !            51: Content-type: text/html
        !            52: 
        !            53: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>