Add-on download does not show installation prompt

We noticed some recent Firefox update has cause our self-hosted add-on (.xpi file) download to not trigger the installation. When clicking the .xpi link, user is prompt with the dialog attached below, which only has ‘open with’ and ‘save file’ options. And user has to download the file and drag/drop it into the browser to get it installed.

Can someone please answer why this is happening and what should I do to have the auto-triggered installation work like before.

Thanks.

ff-addon-download

What headers are you sending with the file? It appears the mime type is correct, or at least leads to one with a good name in the mime type table.

Hi Martin,
Here is the response header sent along the xpi.

response_header

Thanks,

Hm. We tried testing this and saw no content-type headers. :frowning: Can you try testing on another device?

Hi Caltlin,
I tested on Windows with two Firefox versions (57.0.4 and 68.0.2) and observed the same issue. The response header are basically the same as what’s on Ubuntu. See attached screenshot.

I vaguely remember that I saw the install prompt before on 57.0.4 (might be long time ago), so could it be some change on distribution policy or is our xpi expired in some sense (it was uploaded and approved in March, 2018).

thanks,

Comparing with AMO, AMO doesn’t send

Content-Disposition: attachment

Are you able to turn that off?

Hi jscher2000,
Thanks a lot! It worked when I removed that content-disposition header, although I was doing it using an extension. I haven’t figured out a way to change it on our backend, but it shouldn’t be impossible to do.

Also, is it intended for “content-disposition: attachment” to be handled that way by FF for .xpi dowloads? Either way, I will be keeping searching for a solution on our end.

Thanks a lot!