On Mittwoch, 1. November 2017 22:21:38 CET Daniel Stenberg wrote:
> On Wed, 1 Nov 2017, Tim Rühsen wrote:
> > Content-Encoding: gzip means that the data has been compressed for
> > transportation purposes only.
> 
> That's actually not what it means. There's transfer-encoding for that
> purpose, but that's not generally supported by clients.

I didn't want to over-complicate things. What I indeed didn't remember was 
that Transfer-Encoding allows 'gzip' (even in combination with chunked):
https://tools.ietf.org/html/rfc7230#section-3.3.1

> RFC7231 section 3.1.2.1 [*] says this:
> 
>     Content coding values indicate an encoding transformation that has
>     been or can be applied to a representation.
> 
> [*] = https://tools.ietf.org/html/rfc7231#section-3.1.2.1

"has been or can be" are to different things which also include "is/was not".
How would you (or curl) handle
  Content-Type: application/x-tar
  Content-Encoding: gzip
when downloading 'x.tar.gz' or 'x.tgz' ? Save the file compressed or 
uncompressed ? And what if the file is (correctly) named 'x.tar' ?

I downloaded/tested thousands of web pages and they behave as if 'Content-
Encoding: gzip' is a compression for the transport. Uncompressing it 'on-the-
fly' and saving that uncompressed data was the correct behavior.

Regards, Tim

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to