Bug #18095 Updated: browser cant read zlib compressed output
| From: | bugzilla at cm51-210 dot liwest dot at | Date: | Tue, 02 Jul 2002 09:20:05 +0000 |
| Subject: | Bug #18095 Updated: browser cant read zlib compressed output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12782@lists.php.net to get a copy of this message | ||
ID: 18095
Updated by: bugzilla@cm51-210.liwest.at
Reported By: bugzilla@cm51-210.liwest.at
Status: Open
Bug Type: Zlib Related
Operating System: Linux 2.4.18
PHP Version: 4.0CVS-2002-07-01
New Comment:
did a little debugging with socat:
request:
> GET /wiki/index.php?pagename=RecentChanges HTTP/1.1\r
> Host: cm51-210.liwest.at:91\r
> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a+)
Gecko/20020624\r
> Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text
/css,*/*;q=0.1\r
> Accept-Language: en-us, en;q=0.50\r
> Accept-Encoding: gzip, deflate, compress;q=0.9\r
> Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66\r
> Keep-Alive: 300\r
> Connection: keep-alive\r
response:
< HTTP/1.1 200 OK\r
< Date: Tue, 02 Jul 2002 11:13:10 GMT\r
< Server: Apache/2.0.40-dev (Unix) mod_ssl/2.0.40-dev OpenSSL/0.9.6b
PHP/4.3.0-dev\r
< Accept-Ranges: bytes\r
< X-Powered-By: PHP/4.3.0-dev\r
< Set-Cookie: PHPSESSID=974cec260ca6ac776ff114bf0a1e2f08; path=/\r
< Set-Cookie:
WIKI_PREFS2=O%3A15%3A%22userpreferences%22%3A1%3A%7Bs%3A6%3A%22_prefs%22%3Ba%3A0%3A%7B%7D%7D;
expires=Wed, 02-Jul-03 11:13:10 GMT
; path=/\r
< Last-Modified: Sat, 29 Jun 2002 10:19:44 +0000\r
< Transfer-Encoding: chunked\r
< Content-Type: text/html; charset=iso-8859-1\r
< \r
< 3661\r
< ..\b........@6..<?xml version="1.0" encoding="iso-8859-1"?>
< <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
< "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< <html xmlns="http://www.w3.org/1999/xhtml">
< <head>
for other pages i get
< HTTP/1.1 200 OK\r
< Date: Tue, 02 Jul 2002 11:16:39 GMT\r
< Server: Apache/2.0.40-dev (Unix) mod_ssl/2.0.40-dev OpenSSL/0.9.6b
PHP/4.3.0-dev\r
< Accept-Ranges: bytes\r
< X-Powered-By: PHP/4.3.0-dev\r
< Set-Cookie:
WIKI_PREFS2=O%3A15%3A%22userpreferences%22%3A1%3A%7Bs%3A6%3A%22_prefs%22%3Ba%3A0%3A%7B%7D%7D;
expires=Wed, 02-Jul-03 11:16:39 GMT
; path=/\r
< Content-Encoding: gzip\r
< Vary: Accept-Encoding\r
< Content-Length: 12914\r
< Content-Type: text/html; charset=iso-8859-1\r
< \r
< ..\b........Q2..<?xml version="1.0" encoding="iso-8859-1"?>
< <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
< "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< <html xmlns="http://www.w3.org/1999/xhtml">
< <head>
Transfer-Encoding / Content-Encoding ????
Previous Comments:
------------------------------------------------------------------------
[2002-07-02 04:24:13] bugzilla@cm51-210.liwest.at
zlib.output_compression Off
zlib.output_compression_level 0
(http://cm51-210.liwest.at/info/) -> faulty gzheader is generated
setting output compression to "0" & restarting ->
in phpinfo, output compression stays "off",
gzheader is generated again :-(
i dont think that the correct content encoding header is generated ...
trying to test that via netcat
------------------------------------------------------------------------
[2002-07-01 16:33:24] sr@php.net
If you use 0 as zlib.ouput_compression_level, the output isn't
compressed, but the gzip/deflate headers are added to the output (and
the corresponding Content-Encoding header).
Can you check with a phpinfo()-page that zlib.output_compression really
is set to "off" (otherwise try setting it to "0")?
I can't reproduce the binary display with your example URL, it works
with Mozilla 1.0 and lynx, if I make the HTTP by hand, it displays the
correct headers.
------------------------------------------------------------------------
[2002-07-01 15:20:23] bugzilla@cm51-210.liwest.at
i think the compressed data is the gzlib "dont compress, store only"
header.
browser is mozilla 1.1 cvs
doesnt work with ie 6.0 either
------------------------------------------------------------------------
[2002-07-01 15:16:28] bugzilla@cm51-210.liwest.at
if i compile with --with-zlib,
output is zlib compressed (can check if i download page and gunzip) but
browser displays binary output. (maybe content-type is wrong ?)
zlib.output_compression is set to OFF (doesnt help)
if i set zlib.output_compression_level = 0
output is readable, but prefixed with binary data
4(Ë×<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
you can check by yourself:
http://cm51-210.liwest.at/wiki/index.php?pagename=LinzCam
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18095&edit=1