Downloaded filenames fubar: content-disposition?

software development

#1

UPDATE: Please ignore, I am stupid.

The file is in fact being served by a script (with a bug) not directly by Apache as I wrote below…

Whoops.

–Andrew

Hi,

I’m not sure if this is specific to the “programming” forum since it’s more of a “server configuration” question, but here goes…

I’m linking a page to a file for download:
Download MP3

The download is served directly from the filesystem by httpd, not a script.

When it downloads in IE6 or Safari/Mac, the file name becomes "Cool It.mp3"
In IE7, "Cool_It.mp3"
And in Firefox, “Cool” (that’s just not cool!)

The real problem is with firefox because the file extension is lost altogether, and the downloaded file becomes unusable for most people who don’t know to rename it with a proper extension.

See the bug description here, which Mozilla is not fixing:
http://kb.mozillazine.org/Filenames_with_spaces_are_truncated_upon_download

I’m wondering if there’s a setting for the content-disposition or filename on the server that’s affecting this? Why am I getting spaces and capitals when the original filename is lowercase with an underscore?

Any ideas or workarounds?

Thanks,
Andrew


#2

Can you post a URL? I’d like to see the behavior for myself.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

DELETED, irrelevant.


#4

Sorry, my error.

The file is in fact being served by a script (with a bug) not directly by Apache as I wrote below…

Whoops.

–Andrew


#5

Okay that is weird. MP3 files should be served as “audio/mpeg”, and the DreamHost server is automatically configured to deliver files as such when the have an extension of “.mp3”. There must be a problem with the file itself. Try renaming and re-uploading the file, making sure you do the upload in binary mode.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#6

Okay, no prob.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]