HttpWebRequest Accept-Encoding: gzip Header



Hi,
I've developed a solution to call a webservice via HTTPWebRequest
The IIS is configured to allow compression (gzip).

The client application add to the request header the accept-
encoding:gzip

request.AllowWriteStreamBuffering = true;
request.SendChunked = false;
request.KeepAlive = true;
request.Method = "POST";

// tell the HTTP server that the client accept compressed
data
request.Headers.Add("Accept-Encoding: gzipr\n");

I've tested with success the code on my laptop, but on my pocket Pc
this does not work. I mean, i can successfully call the webservice but
i never receive the contents compressed.

In order to demystify this issue I've placed an http sniffer and came
to the conclusion that when i run the code into my laptop the header
accept-encoding is sent and from Pocket PC is not (this way the IIS
cant know if the client allows compression).

Investigating a little more i did the following:
request.Headers.Add("Accept-Encoding: gzipr\n");
request.Headers.Add("TestHeader: okr\n");

Running this code in pocket PC i saw that he sends the "TestHeader"
Header. He only omits the Accept-Encoding. Why is that?

Note: This behaviour occurs on Compact Framework 1.1 and 2.0; on
pocket pc 2003 mobile edition and on WinCE 5.0

What is happening? Can you help me?

Thanx

.



Relevant Pages

  • Re: Repeatable compression is possible and easy to do, heres how...
    ... Establish three streams of pseudo-random data, ... love with disallows not only repeatable compression but regular ... values for a b c client. ...
    (comp.compression)
  • Re: HTTP Compression issues with IIS 5
    ... Thanks for your response. ... it simply tells client the local cache still can be used ... Specify Additional Document Types for HTTP Compression ...
    (microsoft.public.inetserver.iis)
  • Re: HTTP Compression issues with IIS 5
    ... "Won't this expire all content on the client immediately including ... clients when using HTTP compression. ... I previously suggest you select 'expire immediately' to see if this ... Specify Additional Document Types for HTTP Compression ...
    (microsoft.public.inetserver.iis)
  • Remoting large dataset - deserialization is slow
    ... We use the compression code given ... in Chapter 13, Extending .Net Remoting, by Ingo Rammer. ... other things which take time at the client side and server side. ... Stream outStream = new System.IO.MemoryStream; ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Remoting large dataset - deserialization is slow
    ... We use the compression code given ... in Chapter 13, Extending .Net Remoting, by Ingo Rammer. ... other things which take time at the client side and server side. ... Stream outStream = new System.IO.MemoryStream; ...
    (microsoft.public.dotnet.framework.remoting)