• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Download firefox problem

5.00 star(s)
My problem could be a misconfigured server then. The shared hosting site I noticed this on recently fixed the Content-Type header setting for downloading log files (*.txt) via the Control Panel. I wonder if they accidentally broke plain text files while they were at it.

Is there a magic incantation I can throw into the HTML which references these text files to set the mime type from there?

Afraid not :(

If they aren't static text files and you have access to the code that serves them, you could pass a type in the query string. Another possibility (on Apache) would be modifying the server config on a per-directory per-filetype basis to set the content type, maybe using a .htaccess file.
 
Afraid not :(

If they aren't static text files and you have access to the code that serves them, you could pass a type in the query string. Another possibility (on Apache) would be modifying the server config on a per-directory per-filetype basis to set the content type, maybe using a .htaccess file.

They are static text files and the HTML is static too. No PHP or CGI involved and it's wicked fast :-)

,htaccess looks promising. Thanks.
 
Could you enforce text by opposite of my problem, prefix with x0D or some other recognisable text? If it's text then odd extra byte at the front hardly matters.
 
It looks like the ISP has fixed it now, because I couldn't reproduce the problem.

However I have stuck the following into .htaccess, just in case:

Code:
AddType text/plain .txt
 

Advertisers

Back
Top