W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2010

Re: httpbis and deflate compression...

From: Dan Winship <dan.winship@gmail.com>
Date: Thu, 25 Mar 2010 23:36:46 -0400
Message-ID: <4BAC2BCE.8030705@gmail.com>
To: David Morris <dwm@xpasc.com>
CC: Julian Reschke <julian.reschke@gmx.de>, "Mahdavi, Jamshid" <jamshid.mahdavi@bluecoat.com>, ietf-http-wg@w3.org
On 03/25/2010 09:08 PM, David Morris wrote:
> If someone could provide sniff like rules I could apply to deflate
> content, if I find any, to determine which variation it is

zlib-wrapped-deflate has a small header, but there are no magic numbers
in it so there's not a lot to sniff. (The lower 3 bits of the first byte
are always 0x8 though...) Raw deflate data has no header at all and so
can look more or less like anything (including a valid zlib header). The
only way to actually tell which kind of deflate it is is to try decoding
it, and see if you get a "data is corrupt" error, and if so, that means
it was the other kind and you should try again. (At least, that's how
Firefox does it.)

-- Dan
Received on Friday, 26 March 2010 03:37:41 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 2 February 2023 18:43:22 UTC