#35433 [Csd->Bgs]: phpinfo() function does no send a Content-Type header
| From: | tony2001@php.net | Date: | Sun, 27 Nov 2005 22:45:23 +0000 |
| Subject: | #35433 [Csd->Bgs]: phpinfo() function does no send a Content-Type header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-89134@lists.php.net to get a copy of this message | ||
ID: 35433
Updated by: tony2001@php.net
Reported By: cyberdog3k at gmail dot com
-Status: Closed
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Windows Server 2003
PHP Version: 5.1.0
Previous Comments:
------------------------------------------------------------------------
[2005-11-27 23:42:36] cyberdog3k at gmail dot com
This bug is apparently invalid. I was being thrown by the fact that
default_charset was commented out by default in php.ini, which was
causing php to not send any charset with the header. This was causing
validation to fail. This combined with the commented out portion of
source led me to the conclusion that the header was missing. My final
question would be is it good practice to have PHP sending no charset by
default? Maybe this makes it more universal or something in forcing
everyone to set it manually? I just feel like I should have been
prompted for charset during setup or something, rather than just
leaving it out. Maybe worthy of a feature request?
------------------------------------------------------------------------
[2005-11-27 23:26:21] tony2001@php.net
Why did you decide it doesn't send it?
Did you check it with telnet or something else?
From what I can see, the header is there and it's fine:
Content-Type: text/html
------------------------------------------------------------------------
[2005-11-27 23:20:38] cyberdog3k at gmail dot com
Description:
------------
The phpinfo() function does not return a Content-Type header. I found
in ext/standard/info.c that the <meta http-equiv=\"Content-Type\"
content=\"text/html; charset=%s\" /> line is commented out, but there
does not seem to be an explanation in the comments for why this is the
case. I've verified that no Content-Type header is ever inserted on
its way to the client. This poses a problem when validating the
results, and would seem to be poor practice even if it's not entirely
necessary to have the tag in there.
Reproduce code:
---------------
<?php
phpinfo();
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35433&edit=1