Hi,

I am downloading a webpage from IIS and I want to take advantage of
compression to reduce GPRS costs and download time.

I am using the following code. However, it seems that the
"Accept-Encoding" header is not really sent to the webserver:


Dim mySB As StringBuilder = New StringBuilder
Dim request As HttpWebRequest = CType(WebRequest.Create(strUrl),_
HttpWebRequest)
request.Headers.Add("Accept-Encoding", "gzip,deflate")
Dim response As HttpWebResponse = CType(request.GetResponse,_
HttpWebResponse)

..the IIS webpage *is* able to deliver compressed content, I checked
with the following tool:

http://www.gidnetwork.com/tools/gzip-test.php

Any ideas?

(using: vstudio2005, cf 2.0, ppc 2003)

Marcantonio

Re: gzip,deflate: ignored. by Sergey

Sergey
Fri May 19 07:08:50 CDT 2006

This article may help you:
http://www.flowgroup.fr/en/kb/technical/compressionhttp.aspx


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Marcantonio wrote:
> Hi,
>
> I am downloading a webpage from IIS and I want to take advantage of
> compression to reduce GPRS costs and download time.
>
> I am using the following code. However, it seems that the
> "Accept-Encoding" header is not really sent to the webserver:
>
>
> Dim mySB As StringBuilder = New StringBuilder
> Dim request As HttpWebRequest = CType(WebRequest.Create(strUrl),_
> HttpWebRequest)
> request.Headers.Add("Accept-Encoding", "gzip,deflate")
> Dim response As HttpWebResponse = CType(request.GetResponse,_
> HttpWebResponse)
>
> ..the IIS webpage *is* able to deliver compressed content, I checked
> with the following tool:
>
> http://www.gidnetwork.com/tools/gzip-test.php
>
> Any ideas?
>
> (using: vstudio2005, cf 2.0, ppc 2003)
>
> Marcantonio

Re: gzip,deflate: ignored. by Trapulo

Trapulo
Fri May 19 11:16:21 CDT 2006

It seems very good solution.
But I dont't understand if this approach works either to compress data
uploaded to the server during request... Is this right?


"Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
news:O8an7zzeGHA.5088@TK2MSFTNGP02.phx.gbl...
> This article may help you:
> http://www.flowgroup.fr/en/kb/technical/compressionhttp.aspx
>
>
> --
> Sergey Bogdanov [.NET CF MVP, MCSD]
> http://www.sergeybogdanov.com
>
>
> Marcantonio wrote:
>> Hi,
>>
>> I am downloading a webpage from IIS and I want to take advantage of
>> compression to reduce GPRS costs and download time.
>>
>> I am using the following code. However, it seems that the
>> "Accept-Encoding" header is not really sent to the webserver:
>>
>>
>> Dim mySB As StringBuilder = New StringBuilder
>> Dim request As HttpWebRequest = CType(WebRequest.Create(strUrl),_
>> HttpWebRequest)
>> request.Headers.Add("Accept-Encoding", "gzip,deflate")
>> Dim response As HttpWebResponse = CType(request.GetResponse,_
>> HttpWebResponse)
>>
>> ..the IIS webpage *is* able to deliver compressed content, I checked with
>> the following tool:
>>
>> http://www.gidnetwork.com/tools/gzip-test.php
>>
>> Any ideas?
>>
>> (using: vstudio2005, cf 2.0, ppc 2003)
>>
>> Marcantonio