#21473 [NEW]: Content-Type header ignored when default character encoding set in php.ini

From: Date: Mon, 06 Jan 2003 22:03:16 +0000
Subject: #21473 [NEW]: Content-Type header ignored when default character encoding set in php.ini
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29245@lists.php.net to get a copy of this message
From: jason@buberel.org Operating system: Linux PHP version: 4.2.3 PHP Bug Type: Output Control Bug description: Content-Type header ignored when default character encoding set in php.ini In php 4.2.3, if a value is specifed for the default_charset variable in /etc/php.ini, attempts to modify the content type using: header("Content-Type: text/vnd.wap.wml"); will be ignored by PHP: > telnet www.buberel.org 80 Trying 10.0.0.1... Connected to taylor.buberel.org (10.0.0.1). Escape character is '^]'. get /wapmail/test.php HTTP/1.0 HTTP/1.1 200 OK Date: Mon, 06 Jan 2003 21:32:01 GMT Server: Apache-AdvancedExtranetServer/1.3.26 (Mandrake Linux/6.1mdk) mod_ssl/2.8.10 OpenSSL/0.9.6g PHP/4.2.3 X-Powered-By: PHP/4.2.3 Connection: close Content-Type: text/html; charset=iso-8859-15 <?xml version="1.0"?> However, when the value of default_charset is set to the empty string ("") in /etc/php.ini, the content-type header is handled properly: > telnet www.buberel.org 80 Trying 10.0.0.1... Connected to taylor.buberel.org (10.0.0.1). Escape character is '^]'. get /wapmail/test.php HTTP/1.0 HTTP/1.1 200 OK Date: Mon, 06 Jan 2003 22:02:04 GMT Server: Apache-AdvancedExtranetServer/1.3.26 (Mandrake Linux/6.1mdk) mod_ssl/2.8.10 OpenSSL/0.9.6g PHP/4.2.3 X-Powered-By: PHP/4.2.3 Random-Header: x/y Connection: close Content-Type: text/vnd.wap.wml <?xml version="1.0"?> -jason -- Edit bug report at http://bugs.php.net/?id=21473&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21473&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21473&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21473&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21473&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21473&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21473&r=support Expected behavior: http://bugs.php.net/fix.php?id=21473&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21473&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21473&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21473&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21473&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21473&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21473&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21473&r=gnused

« previous php.bugs (#29245) next »