cURL / Mailing Lists / curl-library / Single Mail


Re: Problem in receiving compressed data.

From: Daniel Stenberg <>
Date: Wed, 7 Nov 2001 07:51:56 +0100 (MET)

On Tue, 6 Nov 2001, Shailesh Mittal wrote:

Please *read* the text in the "bounces". You get informational posts every
time you mail to the libcurl Mailing list because you are not subscribed. We
do not let unsubscribed people post to the mailing list without approval from
one of the mailing list admins. We are two persons who can approve "pending"
mails, and we do that pretty frequently. We do this to prevent spam.

If you want to avoid that nuisance, get subscribed. If you don't, then expect
to continue getting the bounces for every post. DO NOT just resend the mails,
it just makes us all annoyed.

> I am facing problem in receiving the compressed data from a servlet
> running on Tomcat. The client is in VisualC++.
> On the server I am doing the following,
> {
> response.setHeader("Content-Encoding", "gzip");
> response.setContentType("text/plain");
> out = new PrintWriter(new GZIPOutputStream(response.getOutputStream()), false);
> out.println("XML Data to be compressed");
> }
> On the client, the code is
> SetWebFormHeaders_b ("Accept-Encoding", "gzip");
> SetWebFormHeaders_b ("Content-Type", "application/x-www-form-urlencoded");

Wait a second, that's the "Content-Type" header supposed to do?

> retCC = curl_easy_perform(m_curl);

> At this point if I see the transmitted data from server, no data is
> transmitted.

I'd guess that this is because something is wrong in your setopt()s or

libcurl doesn't know anything about the data being compressed or not, and it
doesn't care. It delivers the data, no matter what you send.

> When I access the URL using curl.exe from command line, I get the
> compressed data. I get the following display at the command line,
> E:\curl\Core\curl-7.9-win32-ssl-devel>curl -vi
> http://localhost:8080/examples/servlet/SrvScribeMain

That proves that libcurl knows how to get the data, if you only just give it
correct instructions.

> Please let me know how to resolve this problem.

Can you download _anything_ with libcurl from your program? Is this the only
download that doesn't work?

We might need to see more of your code to figure out what's wrong. I don't
think this is a problem in libcurl.

    Daniel Stenberg -- curl groks URLs --
Received on 2001-11-07