Debian Bug report logs - #501192
squid3: Browsers issuing a "Content Encoding Error" when browsing site with gzip/deflate enabled

version graph

Package: squid3; Maintainer for squid3 is Luigi Gangitano <luigi@debian.org>; Source for squid3 is src:squid3.

Reported by: Giovanni Toraldo <scurippio@gmail.com>

Date: Sun, 5 Oct 2008 12:15:05 UTC

Severity: normal

Found in version squid3/3.0.STABLE8-1

Fixed in version 3.0.STABLE16-1

Done: Luigi Gangitano <luigi@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Sun, 05 Oct 2008 12:15:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Giovanni Toraldo <scurippio@gmail.com>:
New Bug report received and forwarded. Copy sent to Luigi Gangitano <luigi@debian.org>. (Sun, 05 Oct 2008 12:15:08 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Giovanni Toraldo <scurippio@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: squid3: Browsers issuing a "Content Encoding Error" when browsing site with gzip/deflate enabled
Date: Sun, 05 Oct 2008 14:13:32 +0200
Package: squid3
Version: 3.0.STABLE8-1
Severity: normal


I'm using squid in transparent mode, with minimal conf changes.
When browsing some particular websites (like
http://www.symfony-project.org/api/1_1/) with many version of firefox,
an error page is issued, concerning about a compression method not know
or not supported. Setting firefox internal variable
network.http.accept-encoding from gzip,deflate to blank is a workaround,
but 4 random chars are displayed on every page before the html output
starts (could be them that brokes the content of the compressed page?).

Don't know if this could be an upstream squid bug or a bad webserver serving
pages, but with squid2 on etch i never had this problem in the same
environment.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-3-gt (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages squid3 depends on:
ii  adduser                  3.110           add and remove users and groups
ii  libc6                    2.7-13          GNU C Library: Shared libraries
ii  libdb4.6                 4.6.21-11       Berkeley v4.6 Database Libraries [
ii  libgcc1                  1:4.3.1-9       GCC support library
ii  libldap-2.4-2            2.4.10-3        OpenLDAP libraries
ii  libpam0g                 1.0.1-4+b1      Pluggable Authentication Modules l
ii  libsasl2-2               2.1.22.dfsg1-23 Cyrus SASL - authentication abstra
ii  libstdc++6               4.3.1-9         The GNU Standard C++ Library v3
ii  logrotate                3.7.1-3         Log rotation utility
ii  lsb-base                 3.2-20          Linux Standard Base 3.2 init scrip
ii  netbase                  4.34            Basic TCP/IP networking system
ii  squid3-common            3.0.STABLE8-1   A full featured Web Proxy cache (H

squid3 recommends no packages.

Versions of packages squid3 suggests:
ii  resolvconf                    1.42       name server information handler
ii  smbclient                     2:3.2.3-1  a LanManager-like simple client fo
pn  squid3-cgi                    <none>     (no description available)
pn  squidclient                   <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Tue, 07 Oct 2008 00:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to amos@treenet.co.nz:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Tue, 07 Oct 2008 00:39:03 GMT) Full text and rfc822 format available.

Message #10 received at 501192@bugs.debian.org (full text, mbox):

From: "Amos Jeffries" <amos@treenet.co.nz>
To: 501192@bugs.debian.org
Cc: scurippio@gmail.com
Subject: Re: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Tue, 7 Oct 2008 13:35:36 +1300 (NZDT)
This is a known issue it only affects Squid 3.0 of current branches.
The bug is not in Squid itself but in the website IIS server. Which should
not be sending chunked-encoding content back to an HTTP/1.0 client or
proxy.

see, for background
 http://squidproxy.wordpress.com/2008/04/29/chunked-decoding/

There is a workaround for 3.0 by adding this to your config:

 acl broken dstdomain <broken_domains>
 request_header_accesss deny Accept-Encoding broken

A workaround has been added to squid 2.6+ and the upcoming 3.1+ which
resolves this without special configuration.





Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Wed, 08 Oct 2008 17:15:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Scorp <scurippio@gmail.com>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Wed, 08 Oct 2008 17:15:06 GMT) Full text and rfc822 format available.

Message #15 received at 501192@bugs.debian.org (full text, mbox):

From: Scorp <scurippio@gmail.com>
To: amos@treenet.co.nz
Cc: 501192@bugs.debian.org
Subject: Re: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Wed, 08 Oct 2008 19:12:44 +0200
Amos Jeffries ha scritto:
> This is a known issue it only affects Squid 3.0 of current branches.
> The bug is not in Squid itself but in the website IIS server. Which should
> not be sending chunked-encoding content back to an HTTP/1.0 client or
> proxy.

Probably this isn't my case, http://www.symfony-project.org is using
Apache 2.

I've tried the workaround but anything changed.

Any other suggestions?




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#501192; Package squid3. (Mon, 27 Oct 2008 19:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luigi Gangitano <luigi@debian.org>:
Extra info received and forwarded to list. (Mon, 27 Oct 2008 19:21:03 GMT) Full text and rfc822 format available.

Message #20 received at 501192@bugs.debian.org (full text, mbox):

From: Luigi Gangitano <luigi@debian.org>
To: Scorp <scurippio@gmail.com>, 501192@bugs.debian.org
Cc: amos@treenet.co.nz
Subject: Re: Bug#501192: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Mon, 27 Oct 2008 20:17:43 +0100
Scorp,
can you please provide your configuration file and a trace of the  
request you see this behaviour in?

Thanks,

L

Il giorno 08/ott/08, alle ore 19:12, Scorp ha scritto:
> I've tried the workaround but anything changed.
>
> Any other suggestions?

--
Luigi Gangitano -- <luigi@debian.org> -- <gangitano@lugroma3.org>
GPG: 1024D/924C0C26: 12F8 9C03 89D3 DB4A 9972  C24A F19B A618 924C 0C26






Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Mon, 27 Oct 2008 20:24:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Giovanni T." <scurippio@gmail.com>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Mon, 27 Oct 2008 20:24:05 GMT) Full text and rfc822 format available.

Message #25 received at 501192@bugs.debian.org (full text, mbox):

From: "Giovanni T." <scurippio@gmail.com>
To: "Luigi Gangitano" <luigi@debian.org>
Cc: 501192@bugs.debian.org, amos@treenet.co.nz
Subject: Re: Bug#501192: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Mon, 27 Oct 2008 21:20:58 +0100
[Message part 1 (text/plain, inline)]
Here is my current conf, it's the default plus  a redirect for squidGuard

acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 192.168.66.0/24
acl localnet src 10.66.0.0/24
acl SSL_ports port 443
acl Safe_ports port 80        # http
acl Safe_ports port 21        # ftp
acl Safe_ports port 443        # https
acl Safe_ports port 70        # gopher
acl Safe_ports port 210        # wais
acl Safe_ports port 1025-65535    # unregistered ports
acl Safe_ports port 280        # http-mgmt
acl Safe_ports port 488        # gss-http
acl Safe_ports port 591        # filemaker
acl Safe_ports port 777        # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
http_access allow localnet
http_access allow localhost
http_access deny all
icp_access deny all
htcp_access deny all
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid3/access.log squid
refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern (cgi-bin|\?)    0    0%    0
refresh_pattern .        0    20%    4320
icp_port 3130
coredump_dir /var/spool/squid3
redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf

Actually i see that the URL I included in the report is now working again,
probably they have fixed something..? But the issue remains, for example, in
http://www.wininizio.it/

Now i see that if I wget http://www.wininizio.it/ and head it, i see same
random ascii char before che effective html page output, that i think it
does not should be there, as in precedence with symfony-project.org:

obluraschi:/tmp# wget http://www.wininizio.it/forum/index.php -q -O -|head
-n 3
59070
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">

How can I attach a trace of the request?
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#501192; Package squid3. (Tue, 28 Oct 2008 00:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luigi Gangitano <luigi@debian.org>:
Extra info received and forwarded to list. (Tue, 28 Oct 2008 00:30:05 GMT) Full text and rfc822 format available.

Message #30 received at 501192@bugs.debian.org (full text, mbox):

From: Luigi Gangitano <luigi@debian.org>
To: "Giovanni T." <scurippio@gmail.com>, 501192@bugs.debian.org
Subject: Re: Bug#501192: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Tue, 28 Oct 2008 01:29:08 +0100
Il giorno 27/ott/08, alle ore 21:20, Giovanni T. ha scritto:
> obluraschi:/tmp# wget http://www.wininizio.it/forum/index.php -q -O  
> -|head -n 3
> 59070
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
> ">
> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">

This is normal in chunked-encoding HTTP transfer, the number you see  
is the size in byte of next chunk. Chunked encoding is only supported  
in HTTP/1.1 while squid only implements HTTP/1.0.

Please see http://squidproxy.wordpress.com/2008/04/29/chunked- 
decoding/ for all the details.

> How can I attach a trace of the request?

Please do the squidclient test from the above web page. You can also  
attach a tcpdump log (please set capture size to 1500 to get all data)  
of both connections client<-->proxy and proxy<-->server.

Thanks,

L

--
Luigi Gangitano -- <luigi@debian.org> -- <gangitano@lugroma3.org>
GPG: 1024D/924C0C26: 12F8 9C03 89D3 DB4A 9972  C24A F19B A618 924C 0C26






Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Sat, 01 Nov 2008 18:24:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Giovanni T." <scurippio@gmail.com>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Sat, 01 Nov 2008 18:24:07 GMT) Full text and rfc822 format available.

Message #35 received at 501192@bugs.debian.org (full text, mbox):

From: "Giovanni T." <scurippio@gmail.com>
To: 501192@bugs.debian.org
Subject: Re: Bug#501192: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Sat, 01 Nov 2008 19:20:37 +0100
Luigi Gangitano ha scritto:
> Please do the squidclient test from the above web page. You can also
> attach a tcpdump log (please set capture size to 1500 to get all data)
> of both connections client<-->proxy and proxy<-->server.

Seems to be that problem (Transfer-Encoding: chunked)

scorp@obluraschi:~$ squidclient -h 192.168.66.2
http://www.gridvm.org/xen-vs-kvm.html
HTTP/1.0 200 OK
Date: Sat, 01 Nov 2008 17:55:52 GMT
Server: Apache
X-Powered-By: PHP/5.2.1-pl3-gentoo
X-Pingback: http://www.gridvm.org/press/xmlrpc.php
Status: 200 OK
Cache-Control: max-age=300
Expires: Sat, 01 Nov 2008 18:00:52 GMT
Vary: Accept-Encoding,User-Agent
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:3128
Via: 1.0 localhost (squid/3.0.STABLE8)
Proxy-Connection: close

6717
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[...]

But, also in this case, the webserver is Apache !?


scorp@obluraschi:~$ squidclient -r -h 192.168.66.2 http://www.wininizio.it/
HTTP/1.0 200 OK
Date: Sat, 01 Nov 2008 18:16:24 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7a
mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
Last-Modified: Thu, 30 Oct 2008 11:18:13 GMT
ETag: "1c63c0-18ca-45a76a2ee2740"
Accept-Ranges: bytes
Content-Length: 6346
Content-Type: text/html
X-Cache: MISS from localhost
X-Cache-Lookup: HIT from localhost:3128
Via: 1.0 localhost (squid/3.0.STABLE8)
Proxy-Connection: close

<html>

<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
[...]

Instead for this one, no chunked encoding headers found, but firefox
give me error page.



Thanks.





Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#501192; Package squid3. (Mon, 03 Nov 2008 15:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luigi Gangitano <luigi@debian.org>:
Extra info received and forwarded to list. (Mon, 03 Nov 2008 15:12:04 GMT) Full text and rfc822 format available.

Message #40 received at 501192@bugs.debian.org (full text, mbox):

From: Luigi Gangitano <luigi@debian.org>
To: "Giovanni T." <scurippio@gmail.com>, 501192@bugs.debian.org
Subject: Re: Bug#501192: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Mon, 3 Nov 2008 16:07:07 +0100
Il giorno 01/nov/08, alle ore 19:20, Giovanni T. ha scritto:
> scorp@obluraschi:~$ squidclient -h 192.168.66.2
> http://www.gridvm.org/xen-vs-kvm.html
> HTTP/1.0 200 OK
> [...]
> Via: 1.0 localhost (squid/3.0.STABLE8)
> Proxy-Connection: close

I see, can you please use squidclient directly on www.gridvm.org?  
Something like

  squidclient -h www.gridvm.org -p 80 http://www.gridvm.org/xen-vs-kvm.html

If you do, you'll see that server answering in HTTP/1.1 even if the  
request is HTTP/1.0. This is a protocol breakage by the HTTP server  
and is not squid's fault.

Even if it is Apache (on gentoo), it may be misconfigured or there  
could be an accelerator or proxy in front of it. I have not enough  
informations to debug the server issue.

> Instead for this one, no chunked encoding headers found, but firefox
> give me error page.


What error page do you see? Can you please do the same test as above?

Regards,

L

--
Luigi Gangitano -- <luigi@debian.org> -- <gangitano@lugroma3.org>
GPG: 1024D/924C0C26: 12F8 9C03 89D3 DB4A 9972  C24A F19B A618 924C 0C26






Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Mon, 03 Nov 2008 21:27:15 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Giovanni T." <scurippio@gmail.com>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Mon, 03 Nov 2008 21:27:20 GMT) Full text and rfc822 format available.

Message #45 received at 501192@bugs.debian.org (full text, mbox):

From: "Giovanni T." <scurippio@gmail.com>
Cc: 501192@bugs.debian.org
Subject: Fwd: Bug#501192: squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Mon, 3 Nov 2008 22:25:54 +0100
[Message part 1 (text/plain, inline)]
On Mon, Nov 3, 2008 at 4:07 PM, Luigi Gangitano <luigi@debian.org> wrote:

> If you do, you'll see that server answering in HTTP/1.1 even if the request
> is HTTP/1.0. This is a protocol breakage by the HTTP server and is not
> squid's fault.


Yes, replies are in 1.1, understood :)

What error page do you see? Can you please do the same test as above?


scorp@obluraschi:~$ squidclient -h www.wininizio.it -p 80
http://www.wininizio.it/|head <http://www.wininizio.it/%7Chead>
HTTP/1.1 200 OK
Date: Mon, 03 Nov 2008 21:15:34 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7a
mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
Last-Modified: Thu, 30 Oct 2008 11:18:13 GMT
ETag: "1c63c0-18ca-45a76a2ee2740"
Accept-Ranges: bytes
Content-Length: 6346
Connection: close
Content-Type: text/html


It's an 1.1 reply, but there isn't the "Transfer-Encoding: chunked" tag as
with gridvm.org
The firefox error page i mentioned many times, it's "Content encoding Error"
and i cannot browse thru the site. Using konqueror i see only a bunch of
unreable (binary?) characters.



Thanks.
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Thu, 09 Jul 2009 01:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Amos Jeffries <squid3@treenet.co.nz>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Thu, 09 Jul 2009 01:39:02 GMT) Full text and rfc822 format available.

Message #50 received at 501192@bugs.debian.org (full text, mbox):

From: Amos Jeffries <squid3@treenet.co.nz>
To: 501192@bugs.debian.org
Subject: (no subject)squid3: Browsers issuing a "Content Encoding Error" when browsing site with
Date: Thu, 09 Jul 2009 13:33:21 +1200
I still think this is chunked-encoding. But may also be Bug #7 (upstream 
number) and a cache poisoned domain.

chunked issues are resolved by the 3.0.STABLE16-1 package now on its way 
into the archives.

upstream bug #7 needs to be resolved for now with a PURGE request of the 
URL through the cache. It's open against 3.x and 2.x encounter 
performance issues from the short-term fix there.

Amos
Squid Project




Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#501192; Package squid3. (Thu, 09 Jul 2009 01:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Amos Jeffries <squid3@treenet.co.nz>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Thu, 09 Jul 2009 01:57:02 GMT) Full text and rfc822 format available.

Message #55 received at 501192@bugs.debian.org (full text, mbox):

From: Amos Jeffries <squid3@treenet.co.nz>
To: 501192@bugs.debian.org
Subject: squid3: Browsers issuing a "Content Encoding Error"
Date: Thu, 09 Jul 2009 13:53:59 +1200
Actually, looking back I see your test was using squidclient default 
headers. This is not sufficient to always detect chunked encoding.

Running with a forced "Accept-Encoding: *\n" header produces a chunked 
response. Which means both are confirmed as broken chunking and the 
latest Squid package will fix.

REQUEST:

GET http://forum.wininizio.it/index.php?act=home HTTP/1.0
Host: forum.wininizio.it
Pragma: no-cache
Accept-Encoding: *


REPLY:

HTTP/1.1 200 OK
Date: Thu, 09 Jul 2009 01:50:04 GMT
...
Cache-Control: no-cache, must-revalidate, max-age=0
Expires: 0
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html;charset=iso-8859-1

Amos




Reply sent to Luigi Gangitano <luigi@debian.org>:
You have taken responsibility. (Tue, 29 Sep 2009 16:06:14 GMT) Full text and rfc822 format available.

Notification sent to Giovanni Toraldo <scurippio@gmail.com>:
Bug acknowledged by developer. (Tue, 29 Sep 2009 16:06:14 GMT) Full text and rfc822 format available.

Message #60 received at 501192-done@bugs.debian.org (full text, mbox):

From: Luigi Gangitano <luigi@debian.org>
To: 501192-done@bugs.debian.org
Subject: Closed in 3.0.STABLE16-1
Date: Tue, 29 Sep 2009 17:47:47 +0200
Version: 3.0.STABLE16-1

This bug was fixed upstream in 3.0.STABLE16-1.

Regards,

L

--
Luigi Gangitano -- <luigi@debian.org> -- <gangitano@lugroma3.org>
GPG: 1024D/924C0C26: 12F8 9C03 89D3 DB4A 9972  C24A F19B A618 924C 0C26






Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 28 Oct 2009 07:38:13 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 13:03:39 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.