A long time ago Milan Svoboda <[EMAIL PROTECTED]> wrote:
> > i have problem with loading some pages. browser
> > show me the same error message:
> >
> > error reading from socket
> >
> > it's on the same servers.
> > could you try if wwwoffle is functioning on this url ?
> > www.redbox.cz
> >
> > i'm using 2.6d version of wwwoffle.
The reply that I get back from the first site www.redbox.cz is the
following (not using WWWOFFLE):
HTTP/1.0 200 OK
Date: Fri, 31 Aug 2001 21:02:05 GMT
Server: Apache/1.3.14 (Unix) (Red-Hat/Linux) CSacek/2.1.5 PHP/4.0.4pl1
Content-Length: 9327
Vary: Accept-Encoding, Accept-Charset, Accept-Language
Set-Cookie: novy_redbox=1; expires=Thu, 08-Sep-11 21:02:05 GMT
Set-Cookie: dnes_reklama=a; expires=Fri, 02-Jan-70 00:00:00 GMT
X-Powered-By: PHP/4.0.4pl1
Content-Type: text/html; charset=iso-8859-2
Content-Encoding: deflate
Age: 2
This shows that the deflate content-encoding method has been applied
to the data. In RFC 2616 (HTTP/1.1) the deflate content encoding is
defined as:
-------------------- RFC 2616 --------------------
deflate
The "zlib" format defined in RFC 1950 [31] in combination with
the "deflate" compression mechanism described in RFC 1951 [29].
-------------------- RFC 2616 --------------------
The rest of the data is binary and could be compressed. When I
look in detail at the data in the body I see that it starts with hex
characters 0xec, 0x5d, 0x5d, 0x6f. The deflate compression method is
defined in RFC 1951 and the zlib format in RFC 1950 defines the header
and checksum to use for deflate compressed data. The first byte is
defined as:
-------------------- RFC 1950 --------------------
CMF (Compression Method and flags)
This byte is divided into a 4-bit compression method and a 4-
bit information field depending on the compression method.
bits 0 to 3 CM Compression method
bits 4 to 7 CINFO Compression info
CM (Compression method)
This identifies the compression method used in the file. CM = 8
denotes the "deflate" compression method with a window size up
to 32K. This is the method used by gzip and PNG (see
references [1] and [2] in Chapter 3, below, for the reference
documents). CM = 15 is reserved. It might be used in a future
version of this specification to indicate the presence of an
extra field before the compressed data.
CINFO (Compression info)
For CM = 8, CINFO is the base-2 logarithm of the LZ77 window
size, minus eight (CINFO=7 indicates a 32K window size). Values
of CINFO above 7 are not allowed in this version of the
specification. CINFO is not defined in this specification for
CM not equal to 8.
-------------------- RFC 1950 --------------------
The value of CM must be 8 for deflate and the value of CINFO depends
on the compression, but 7 indicates maximum compression. The first
byte of the zlib/deflate data stream is therefore 0x78.
The first bytes of a gzip data stream are defined in RFC 1952 and are
always 0x1f, 0x8b.
So we can see that the data that www.redbox.cz is sending back is not
valid deflate compression as defined for HTTP/1.1.
> it's mystery. whithout proxy i cant load it. with it i
> can't (error in socket).
> same problem on www.linux.sk
> when i ping it, 25percent packet loss.
> but without proxy i can load it in short time.
> but with proxy, message about socket problem
> is diplayed immediately.
The error message from WWWOFFLE in the case of a compression error
like this is misleading. Before version 2.6b when the compression
options were introduced the only possible reason for the error was a
socket timeout. Now there can be a compression error. I will change
the error message to make this clearer.
The solution to these two problems is therefore to use the following
in the OnlineOptions section of the configuration file.
OnlineOptions
{
<*://*redbox.cz/*> request-compressed-data = no
<*://*linux.sk/*> request-compressed-data = no
request-compressed-data = yes
}
This works for me when I have tested it.
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop [EMAIL PROTECTED]
http://www.gedanken.demon.co.uk/
WWWOFFLE users page:
http://www.gedanken.demon.co.uk/wwwoffle/version-2.6/user.html