|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22084 Content-Type: text/css, broaken bigtime in new versions of PHP
Submitted: 2003-02-05 17:58 UTC Modified: 2003-02-06 08:34 UTC
From: tlb at rapanden dot dk Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.2.3 OS: Linux Mandrake 9.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tlb at rapanden dot dk
New email:
PHP Version: OS:


 [2003-02-05 17:58 UTC] tlb at rapanden dot dk
As written in the RFC this "Content-Type: text/css" should be interpreted as
"Content-Type: text/css; charset=ISO-8859-1" by 
any HTTP 1.0/1.1 software, but it's not by newer version of php and it's changed to "Content-Type: text/html; charset=" and that's plain wrong, the one provided to Apache is even more broaken, "Content-Type: text/html; charset=iso-8859-15" there by breaking
support for standard compliant Mozilla/Netscape 7.0 and making any CSS used by non functional.


3.4.1 Missing Charset

   Some HTTP/1.0 software has interpreted a Content-Type header without
   charset parameter incorrectly to mean "recipient should guess."
   Senders wishing to defeat this behavior MAY include a charset
   parameter even when the charset is ISO-8859-1 and SHOULD do so when
   it is known that it will not confuse the recipient.

   Unfortunately, some older HTTP/1.0 clients did not deal properly with
   an explicit charset parameter. HTTP/1.1 recipients MUST respect the
   charset label provided by the sender; and those user agents that have
   a provision to "guess" a charset MUST use the charset from the


header('Content-Type: text/css');


[tlb@tlb tlb]$ wget -O - -d
DEBUG output created by Wget 1.8.2 on linux-gnu.

           => `-'
Resolving done.
Caching =>
Connecting to[]:80... connected.
Created socket 3.
Releasing 0x80830e8 (new refcount 1).
---request begin---
GET /test.php HTTP/1.0
User-Agent: Wget/1.8.2
Accept: */*
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... HTTP/1.1 200 OK
Date: Wed, 05 Feb 2003 23:13:26 GMT
Server: Apache-AdvancedExtranetServer/1.3.26 (Mandrake Linux/6.1mdk) PHP/4.2.3
Vary: Host
X-Powered-By: PHP/4.2.3
Connection: close
Content-Type: text/html; charset=iso-8859-15
Length: unspecified [text/html]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-06 08:34 UTC]
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

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.

4.3.0 was released over a month ago..

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 15:01:28 2024 UTC