#29683 [Opn->Fbk]: headers_list() func. return empty array

From: Date: Mon, 23 Aug 2004 16:59:21 +0000
Subject: #29683 [Opn->Fbk]: headers_list() func. return empty array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65101@lists.php.net to get a copy of this message
ID: 29683 Updated by: iliaa@php.net Reported By: ca533512 at tiscali dot cz -Status: Open +Status: Feedback Bug Type: Unknown/Other Function Operating System: Win2k SP4 PHP Version: 5.0.1 New Comment: What SAPI are you using? Previous Comments: ------------------------------------------------------------------------ [2004-08-14 23:58:00] ca533512 at tiscali dot cz Description: ------------ If I try code from PHP docs of headers_list() function, browser print only empty array. or this function is not available on win OS ? Reproduce code: --------------- /* setcookie() will add a response header on its own */ setcookie('foo', 'bar'); /* Define a custom response header This will be ignored by most clients */ header("X-Sample-Test: foo"); /* Specify plain text content in our response */ header('Content-type: text/plain'); /* What headers are going to be sent? */ var_dump(headers_list()); Expected result: ---------------- array(4) { [0]=> string(29) "X-Powered-By: PHP/5.0.0" // ... 5.0.1 [1]=> string(19) "Set-Cookie: foo=bar" [2]=> string(18) "X-Sample-Test: foo" [3]=> string(24) "Content-type: text/plain" } Actual result: -------------- array(0) { } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29683&edit=1

« previous php.bugs (#65101) next »