W3C home > Mailing lists > Public > www-talk@w3.org > November to December 1996

Re: HTTP header suggestion/request

From: Maurizio Codogno <mau@beatles.cselt.stet.it>
Date: Fri, 8 Nov 1996 12:25:31 +0100
Message-Id: <199611081125.MAA12170@beatles.cselt.stet.it>
To: mnaumann@eso.org
Cc: www-talk@w3.org

% > That form has one ACTION.  On that form you can check a box to download
% > code.tar, code.tar.Z, or code.tar.gz.  The user picks the option they want
% > then submits the form to the CGI.  Since the form has one ACTION only one
% > CGI can be called, and since there are 3 possibly names putting an extension
% > on the ACTION will be wrong for any 2 of them.
% you could use the Content-Disposition: header field
% (beware: it's not in the http-v11-spec07 but borrowed
% from MIME) ie send
%   Content-Type:        application/octet-stream
%   Content-Disposition: attachment; filename=code.tar
% from your ACTION script.

I am surely stupid, but I wrote a short CGI script saying
echo Content-type: application/octet-stream
echo Content-Disposition: attachment; filename="pippo.txt"
echo This is a test - I hope
and tried to access it at 

Answer is 
(B) 12:20 mau 394> telnet localhost 80
Connected to localhost.
Escape character is '^]'.
GET /cgi-bin/test-att HTTP/1.0
HTTP/1.0 200 Document follows
Date: Fri, 08 Nov 1996 11:23:03 GMT
Server: NCSA/1.5.2
Content-type: application/octet-stream
Content-Disposition: attachment
This is a test - I hope
and as you can see the filename is completely lost (actually, netscape
asks where to save "test-att". Is it fault of NCSA httpd ?

Received on Friday, 8 November 1996 06:24:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:59 UTC