- From: John Franks <john@math.nwu.edu>
- Date: Tue, 17 Sep 1996 07:45:57 -0500 (CDT)
- To: Jamison Gulden <jamison@ncic.net>
- Cc: janl@ifi.uio.no, fielding@liege.ICS.UCI.EDU, http-wg%cuckoo.hpl.hp.com@hplb.hpl.hp.com
On Mon, 16 Sep 1996, Jamison Gulden wrote:
>
> Should the content-encoding header ONLY be used when the SERVER
> performs an encoding on the file?
>
Certainly not.
> Should the content-encoding header be used when the SERVER does not
> perform an encoding on the file?
>
Yes, if something other than the server has encoded the file.
HTTP has nothing to say about what happens in a server. It is about
the bytes that go down the wire.
>
> If I ask for a file and it's returned with content-encoding of
> gzip do I get the file I asked for if I unzip it?
>
Yes.
> If I ask for a file and it's returned with content-encoding of
> gzip do I get the file I asked for if I don't unzip it?
>
>
No.
This can be confusing but the things to keep in mind are that
filenames mean nothing and headers describe only the bytes coming down
the wire. Here are some examples
Headers What the client does
------- --------------------
1) C-T: text/html Display it
2) C-T: text/html Unzip and then display it
C-E: x-gzip
3) C-T: application/octet-stream Save to disk (it could be
a gzip'ed file intended to
be saved as a gzip'ed file)
4) C-T: application/octet-stream Unzip and save to disk (it could
C-E: x-gzip be a gzip'ed file intended to
be saved as a gzip'ed file
which has been gzip'ed again)
John Franks Dept of Math. Northwestern University
john@math.nwu.edu
Received on Tuesday, 17 September 1996 05:49:38 UTC