Unable to post a gzip compressed data and get the response

G

Guest

Hi,
I need to access a jsp page from .net compact framework application.
The jsp page supports gzip format and it is deployed in Tomcat server.
I am using "ICSharpCode.SharpZipLib" dll for gzip compression & decompression.
I tried to post a compressed data in gzip format and when i decompress the
response i am getting
"Deflated stream ends early" exception in the .net cf application.

For HttpWebRequest, i have set the following,

req.Headers.Add("Accept-Encoding", "gzip, deflate");
req.Method = "POST";
req.ContentLength = (long)postData.Length;
req.ContentType ="application/x-zip";


But ,I am able to post data using webrequest and am able to get the response
from the server without using the gzip compression.

Thanks
 

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