Re: Status: 204 and PHP's Content-type

From: Date: Thu, 22 Jun 2000 09:22:17 +0000
Subject: Re: Status: 204 and PHP's Content-type
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2597@lists.php.net to get a copy of this message
At 16:09 21.6.2000 -0700, you wrote:
Could someone explain to me how to make a script/cgi in php that prints the "Status: 204 No Content" header, but does *NOT* print the "Content-type: ..." line. Standard or not, if MSIE 5 can't display the page right because of the Content-type, this feature's useless unless someone figures a way around this one.. how about: #!/usr/bin/php -q <? echo "Status: 204\n\n"; ?>
Hello, Hmm strangely enough, if I run that, it gives me 500 Internal server error. I didn't succeed even in most basic script, echoing the Content-type header. Lynx reports an unexpected network read error, Iexplore says it can't display a page (real helpful, huh?) and so on. If I rename the content-type -echoing program to nph-test.cgi (non parsed headers(?)), it runs smoothly but doesn't output anything.. according to errorlog, no errors but also no output.. without the nph- prefix errorlog says 'premature end of script headers'.. but output looks right if I run it in the shell. interresting problem.. Timo

« previous php.general (#2597) next »