This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Èròjà atẹ̀lélànà yii ni a ti fi pamọ́ fọ́jọ́ pípẹ́. Jọ̀wọ́ béèrè ìbéèrè titun bí o bá nílò ìrànwọ́.

Jar files from GitLab are being turned into .jar.zip files

more options

Since earlier this week my Firefox browser has been turning .jar files from GitLab into .jar.zip files, which prevents them from being used properly until renamed. Attempting to download the same files on Edge or Chrome works correctly, and attempting to download any jar files from other websites (even GitHub) also works correctly. It seems that GitLab is the only website that is affected by this.

Examples of files being affected (they should be downloaded as normal .jar files): 1. https://gitlab.com/Trafalcraft/antiRedstoneClock/uploads/3b3c84814d76810f826c3803eaca1e66/antiRedstoneClock-1.4.1.jar 2. https://gitlab.com/Aristois/ui-installer/-/jobs/2505715157/artifacts/raw/packager/Aristois-Free.jar 3. https://gitlab.com/Aristois/Installer/-/jobs/2495195255/artifacts/raw/packager/free/Installer-2.0.3.jar

I'm using Firefox developer edition (102.0b3), and already tried using private mode, resetting Firefox, and reinstalling. Since I use GitLab as a main source to upload files, many users have also complained the same problem to me, in which all of the users were running Firefox. After they downloaded with a different browser, it worked for them as well.

Since earlier this week my Firefox browser has been turning .jar files from GitLab into .jar.zip files, which prevents them from being used properly until renamed. Attempting to download the same files on Edge or Chrome works correctly, and attempting to download any jar files from other websites (even GitHub) also works correctly. It seems that GitLab is the only website that is affected by this. Examples of files being affected (they should be downloaded as normal .jar files): 1. https://gitlab.com/Trafalcraft/antiRedstoneClock/uploads/3b3c84814d76810f826c3803eaca1e66/antiRedstoneClock-1.4.1.jar 2. https://gitlab.com/Aristois/ui-installer/-/jobs/2505715157/artifacts/raw/packager/Aristois-Free.jar 3. https://gitlab.com/Aristois/Installer/-/jobs/2495195255/artifacts/raw/packager/free/Installer-2.0.3.jar I'm using Firefox developer edition (102.0b3), and already tried using private mode, resetting Firefox, and reinstalling. Since I use GitLab as a main source to upload files, many users have also complained the same problem to me, in which all of the users were running Firefox. After they downloaded with a different browser, it worked for them as well.
Ìsopọ̀ yíyà aṣàfihàn

All Replies (7)

more options

How does GitLab send these files if you check this in the Network Monitor (content-type and content-disposition headers) ?

more options

Thanks for the reply. To update this post, I also made a report on bugzilla which was confirmed by others.

content-type is indeed labelled as "application/zip" content-disposition is simply "attachment; filename="(Jar name).jar"


Checking the content-type with edge returns "text/html".

Ti ṣàtúnṣe nípa Dyiing

more options

For reference:

  • 1772758 - GitLab jar files are being renamed to .jar.zip

See also:

  • 1746052 - Unify ways to select and validate filenames when saving

(please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
)

Ti ṣàtúnṣe nípa cor-el

more options

Ah yes, that's my report, I forgot to link it above. I'll just wait and see what happens then. Thanks

more options

Dropa said

No download problem. See screenshot of the download option.

Changing it to "ask first" had no effect. You can even see that it says "compressed zip folder" in the window and has the zip icon. Mine even has the Java logo, but after pressing OK it still becomes a zip.

I've attached a reference. Edit: I believe the reference may be too large, here is an alt link

Ti ṣàtúnṣe nípa Dyiing

more options

Dropa said

See screenshot of the download option.

Mine looks the same as yours. You can even see in the window that it says the filetype is "Compressed (zipped) folder" instead of "Executable jar file". The issue is after pressing OK.

more options

I am not aware of any built-in setting to override this. I do have an add-on that can help, if you would consider that.

Here's how you set up the content-type override for .jar files:

(1) Install the extension from the Mozilla Add-ons site

(2) Click the new Zzzz button on the toolbar to wake it up and start listening/fixing requests -- see the first screenshot below

(3) Trigger the download that is causing the problem; the add-on will log the request

(4) Open the log to add a new rule -- see the first screenshot below

(5) On the line with the .jar request, click the Add button and then paste in this type:

application/java-archive

and click the Save Content-Type button -- see the second screenshot below

(6) Try the download again and Firefox should save it as a .jar file with whatever icon is set up for those at the system level -- see the third screenshot below

Success?