httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eric ng <chiu0...@yahoo.com>
Subject Content-Disposition
Date Thu, 31 May 2001 17:30:49 GMT
Hi,
I have a file download servlet serves web browsers.

request to file is like this
http://192.168.1.105/download/servlet/download?filename=song.mp3
 
The file on the server side is song.mp3.  But the file
got download to browser is the servlet name instead. 
:(

I heard i need to use the HTTP header
res.setHeader("Content-Disposition","attachment;
filename=\"" + downloadFile + "\";"); 

Is Content-Disposition a standard in HTTP spec?  I
heard i should use this when ever I don't want the
content display on browser.

Why everytime I download a file from the web server
like song.mp3. there is no such HTTP header? -->
Content-Disposition

Why if I sent a file from servlet to web browser, i
need to use Content-Disposition?

Any other way I can make the file name on the server
is same as file get (Save as) to web browser?

thanks.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message