Re: Using Content-Encoding and Content-Disposition together

David W. Morris:
>
>On Mon, 4 Aug 1997, Yaron Goland wrote:
>
>> I also agree that the second one is correct. We should not confuse
>> content-encoding with the actual file. After all I could easily be
>> dealing with a server where I, a server side app, send the server a
>> plain text file with a content-disposition of .txt and the smart server
>> knowing it is talking to a UA that supports compression decides to
>> compress on the fly.
>
>Me too ... because as an application which created a compressed file
>wanted it to stay compressed when the UA received it.  

Well, this is not really a case where we have to agree on what the most
correct way is.  19.6.1 documents current practice, it is not
normative, so if anything, it should give hints about what to do with
current browsers.

>I recently 
>received a file of xx.txt.gz ... had the UA ungzip it to show it and
>then save it as xx.txt.gz but uncompressed.

I just sent gzipped content with

 Content-Type: text/html
 Content-Encoding: gzip
 Content-Disposition: attachment; filename="fname.html.gz"

to a Netscape 3.0.1 on Unix.  On saving, the save as filename box
suggested "fname.html", and the unencoded content got saved (the URL
was something without fname.html in it).

Now for the fun part: I then sent the same gzipped html with

 Content-Type: text/html
 Content-Disposition: attachment; filename="fname.html.gz"

and now Netscape displayed and saved the unzipped version, as
expected, but it _also_ suggested a filename of "fname.html".
Apparently there is something in there which chops the .gz from a
filename no matter what.

Based on this, I am very reluctant to add informational text to the
spec about how you should use content-disposition and content-encoding
together.

>Dave Morris

Koen.

Received on Tuesday, 5 August 1997 11:56:52 UTC