cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_ENCODING: downloads and uploads

From: Mohun Biswas <m.biswas_at_cleartool.com>
Date: Wed, 20 Aug 2003 22:15:07 -0400

I just want to check my understanding of the way content encoding is
handled. I've read about CURLOPT_ENCODING in the curl_easy_setopt page,
I've found the README.encoding file, and have scanned the email archives
from ~4/2003 describing the initial patches. But there are a few things
still not obvious to a person coming to this topic for the first time:

1. It's clear, both from documentation and experimentation, that simply
specifying

        curl_easy_setopt(curl, CURLOPT_ENCODING, "");

causes a generous Accept-Encoding header to be sent. But is it the case
that, as long as one has a modern libcurl and links with zlib, that
compressed content will not only be "accepted" but actually decompressed
without further ado? Or must I arrange to send data from curl callbacks
to the zlib stream interfaces by hand?

2. The above accounts for downloaded data. Is there still no built-in
support for uploading compressed data? Or, is there a sample program
anywhere showing how to use gzip compression with multipart file
uploads? I can't see a way of streaming data to a connection via the
curl_formadd() interface. Is this possible at all, or would it be
necessary to build the entire compressed file contents into a buffer and
pass that?

Thanks in advance,
M.B.

-------------------------------------------------------
This SF.net email is sponsored by Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code=104
Received on 2003-08-21