From:             [EMAIL PROTECTED]
Operating system: Linux Mandrake 9.0
PHP version:      4.2.3
PHP Bug Type:     Apache related
Bug description:  Content-Type: text/css, broaken bigtime in new versions of PHP

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.


http://www.jorendorff.com/articles/unicode/unicode-http.html

and

ftp://ftp.isi.edu/in-notes/rfc2616.txt

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

and

test.php:
<?
header('Content-Type: text/css');

?>

[tlb@tlb tlb]$ wget -O - -d http://tlb.rapanden.dk/test.php
DEBUG output created by Wget 1.8.2 on linux-gnu.

--00:14:54--  http://tlb.rapanden.dk/test.php
           => `-'
Resolving tlb.rapanden.dk... done.
Caching tlb.rapanden.dk => 195.249.214.150
Connecting to tlb.rapanden.dk[195.249.214.150]:80... connected.
Created socket 3.
Releasing 0x80830e8 (new refcount 1).
---request begin---
GET /test.php HTTP/1.0
User-Agent: Wget/1.8.2
Host: tlb.rapanden.dk
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]
-- 
Edit bug report at http://bugs.php.net/?id=22084&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22084&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22084&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22084&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22084&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22084&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22084&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22084&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22084&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22084&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22084&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22084&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22084&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22084&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22084&r=gnused

Reply via email to