Header order problems.

From: Date: Wed, 26 Jul 2000 03:34:32 +0000
Subject: Header order problems.
Groups: php.general 
Request: Send a blank email to php-general+get-8197@lists.php.net to get a copy of this message
I'm trying to write out a gzip'ed file and using the following code: <? ob_start(); header("Content-type: text/html"); header("Content-Encoding: gzip"); $data = "<html><head><title>stuff</title></head><body>This is a test of co$ echo gzcompress($data); ob_end_flush(); ?> And no matter how hard I try, Content-type: text/html is always outputted after Content-Encoding: gzip These are the outputted headers: HTTP/1.1 200 OK Date: Wed, 26 Jul 2000 03:20:04 GMT Server: Apache/1.3.4 (Unix) FrontPage/4.0.4.3 Content-Encoding: gzip Connection: close Content-Type: text/html Try as I might, I can't get the encoding to appear after the type (even if I do explicit flush() calls after each header. And this whole gzipping of output doesn't seem to work unless the encoding line appears after the type. Have I found a bug? It smells of something related to their default Content-Type feature introduced in 4.x. PS, changing the Content-Type to something else, like text/htm doesn't affect the order. HELP! -- Steven Herod steven@herod.net http://www.herod.net/steven 'Tomorrow I may eat another houseplant'

« previous php.general (#8197) next »