Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am downloading .jar file from a website, and it always adds .txt extension to the end of the file. I have no doubt that this is probably something wrong with how the website is passing the data to the browser. IE and Chrome do not have this issue. Is there anyway I can get Firefox to stop adding .txt to the end of the file via a config/options or extension change?

My OS: Windows 7

Browser: Firefox 13.0.1

UPDATE

Looking at it further the .jar file is being served using http header

Content-Type: text/plain

Is there anyway to get Firefox to ignore this while right clicking save/as?

share|improve this question
    
Do you have an example page so that we can replicate the problem? –  Mokubai Jul 13 '12 at 13:32
    
unfortunately no its an intranet site that is causing me the problem, I did some more research into the issue and it looks like its being caused by the content-type. –  Halfwarr Jul 13 '12 at 13:38
    
Select Options from the Tool menu, switch to the Applications tab and search for text and under Action pick Use Other... and then change the application to Java(TM) Platform SE Binary. This will probably mess things up when you actually want to download a text file, though. –  martineau Jul 13 '12 at 13:49

1 Answer 1

up vote 3 down vote accepted

There is a firefox addon that allows you to force the content type for particular URLs:

Force Content-Type

An extension to force the Content-Type of URLs.

It's useful to avoid the "tag soup" when you are developing a XHTML webpage and want Firefox to use its internal XML parser. If the webserver is not correctly configured, it will serve the page with a "text/html" Content-Type (a tag soup), instead of sending it as "application/xhtml+xml", and therefore avoiding Firefox to treat the page as pure XML.

"Force Content-Type" allows you to define the Content-Type of some URLs (using Regular Expressions), overriding the webserver's incorrect Content-Type.

I would expect you to be able to use this to override your content-type from within Firefox.

The best way though is to get your webmaster to fix the content-type reported by the server for .jar files.

share|improve this answer
    
Funny you should mention that I was configuring it just as you posted this to test it :D, but yep it worked, I used Old Content Type text/plain and made it New Content-Type application/zip and it worked great. If anyone else is having the problem try using these new settings. –  Halfwarr Jul 13 '12 at 13:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.