gzip,deflate: ignored.

M

Marcantonio

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
 
T

Trapulo

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 said:
This article may help you:
http://www.flowgroup.fr/en/kb/technical/compressionhttp.aspx


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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top