php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21473 Content-Type header ignored when default character encoding set in php.ini
Submitted: 2003-01-06 16:03 UTC Modified: 2003-01-07 19:31 UTC
From: jason at buberel dot org Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.2.3 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jason at buberel dot org
New email:
PHP Version: OS:

 

 [2003-01-06 16:03 UTC] jason at buberel dot org
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-07 19:31 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 04:01:26 2024 UTC