|
Posted by Andy Dingley on 12/04/06 10:18
fj wrote:
> I also tried to link to .exe files but it will not download those files
> either. I've downloaded .exe and .rar files from other sites. The .rar files
> just show as garbled computer language (I think).
Then it has linked to the file, but not managed to serve it correctly.
As a guess (as a I don't know which site you're talking about) then the
page linking to these files is correct. The server where these files
are located is incorrect and badly configured.
Many servers assume that all the files on them are either "HTML" or
"plaintext", unless they're specific sorts of file (like JPG) that it
knows about. The "type" of files can be guessed from the file extension
in their name, but that's not how the web protocols work. Instead they
have a particular header of "content-type" such as "text/plain",
"text/html", "image/jpeg" or "application/octet-stream".
"application/octet-stream" means "We have no idea what this is, just
treat it as raw data and store it, but don't try to view it, run it or
do anything clever with it"
A well-run server should serve file types that it understands
correctly. It will also need a fallback or default for those it doesn't
understand, and that should be "application/octet-stream". If the
server admins want an easy life and no support calls from people
inventing crazy new file extensions, then the temptation is to set the
default up as "text/plain" (or even worse, "text/html") and then let it
serve everything unknown as if it's a viewable text document.
It looks like the server here understands ZIP files and serves them
correctly, but it doesn't know about RAR files and so lets them default
to text/plain. Your browser then sees this (as instructed) as a
viewable text file and tries to view it.
If you have to link to such a file and download it, then one quick hack
is to find a link to it, then instead of following that link and trying
to save it, instead don't follow the link but just use your browser's
"Save link as..." feature (try the right-mouse menu).
Navigation:
[Reply to this message]
|