http/1.1 decompress
- From: "Frederik Vanderhaegen" <frederik.vanderhaegen@xxxxxxxxxx>
- Date: Fri, 25 Aug 2006 19:08:52 +0200
Hi,
I'm writing an application who 'sniffs' port 80.
The sniffing works 'perfect', I receive a byte array with the data sent over
the port.
My problem is the following, when I write the array to a txt file most of
the content is encoded.
The only things that are readable are the http headers from which I can read
that Internet Explorer uses "content-encoding: gzip, deflate".
So I may conclude that I'll need to decompress the data I received.
This is easier said than done:).
I tried to decompress with GZipStream, DeflateStream (both from .NET 2.0)
and SharpZipLib.Gzip.GzipInputstream but neither of them want to decompress
my array.
In the beginning I received several errors about an incorrect magicnumber
and incorrect format. I thought why not add the gzip header
(31,139,8,0,0,0,0,0,0,0) at the start of my array.
..Net didn't throw any exceptions but it didn't decompress (the output is now
an empty file because the bytesread of my decompress stream is 0) my data
either.
Does anyone knows how that Internet Explorer performs the decompression or
how I can perform the decompression myself?
Thx in advance
Frederik.
.
- Follow-Ups:
- Re: http/1.1 decompress
- From: Kevin Spencer
- Re: http/1.1 decompress
- Prev by Date: Re: Applying #include semantics in C#
- Next by Date: Easy object question
- Previous by thread: Convert C# code to Delphi, please help!
- Next by thread: Re: http/1.1 decompress
- Index(es):
Relevant Pages
|