cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_ENCODING: downloads and uploads

From: Mohun Biswas <m.biswas_at_cleartool.com>
Date: Thu, 21 Aug 2003 20:29:41 -0400

Dan Fandrich wrote:
> On Wed, Aug 20, 2003 at 10:15:07PM -0400, Mohun Biswas wrote:
>
>>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:
>
> Compressed pages will be transparently uncompressed by libcurl if this
> option is set and the received encoding is supported. curl -V will tell
> you if you've linked with zlib. No extra work on your part is needed.

As I'm using libcurl the curl -V doesn't apply but the answer is still
clear so thanks.

> There is no support for automatic compressing of data when
uploading. I'm
> not familiar with the form uploading API to definitively answer the second
> part, but I imagine there's some way to manually send and parse the
> appropriate headers to enable compression and then compress the data in
> the upload callback function.

That's the thing, the upload side doesn't seem to be callback-driven.
All the curl_formadd() options refer to files or buffers. If there was a
way to point the upload at a FILE * stream or a callback I could
probably work out how to do this, but there doesn't seem to be such a
thing. I guess uploading with curl/libcurl is significantly less common
than downloading.

MB

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
Received on 2003-08-22