cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Compression & Decompression - Encryption & Decryption support

From: Tim Bannister <isoma_at_jellybaby.net>
Date: Sun, 29 Jan 2012 23:35:01 +0000

On 29 Jan 2012, at 14:47, Sandeep A wrote:

> I was looking for libcurl support to do on the wire compression of files to be uploaded (using PUT).
>
> But when I saw the post http://curl.haxx.se/mail/lib-2008-11/0139.html, I understood that on the wire decompression is supported by libcurl but not on the wire compression.
>
> Is this still valid?

If you want to upload a document that is compressed, and you want the semantics to be that the compression is part of the entity that you are sending, then you can compress the document yourself (ie, before libcurl sees the document).

You should understand what this means. If you have an HTML document, and you add gzip Content-Encoding before sending this to the HTTP server with PUT, then the server will process a compressed document. What you are saying is that if you then GET the same document, you expect to get back exactly the document that you uploaded, gzip Content-Encoding & all.

As Daniel mentioned, at the moment there is no agreed way to negotiate hop-by-hop compression on document upload.

The Transfer-Encoding support is nice to have in libcurl but at the moment there are hardly any webservers that can serve gzip transfer-encoding and (as far as I know) none that would accept it on upload.

-- 
Tim Bannister  isoma_at_jellybaby.net

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

  • application/pkcs7-signature attachment: smime.p7s
Received on 2012-01-30