Re: Header order problems.
| From: | Rasmus Lerdorf | Date: | Wed, 26 Jul 2000 05:21:19 +0000 |
| Subject: | Re: Header order problems. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8209@lists.php.net to get a copy of this message | ||
Try a more recent version of Apache. PHP can't set the order of
headers. All PHP does it fill in the response header table and Apache
decides what order to send them in. So, if it is a bug, it is an Apache
bug, but since you are using an ancient version of Apache I wouldn't try
to track it down until you have tested it in a recent version.
-Rasmus
On Wed, 26 Jul 2000, Steven Herod wrote:
> 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'
>
>
>
>