electron-release-server icon indicating copy to clipboard operation
electron-release-server copied to clipboard

Content disposition filename is not honoured in Chrome 88

Open verhyppo opened this issue 3 years ago • 3 comments

After this commit has been merged https://github.com/ArekSredzki/electron-release-server/commit/084869af7b2495e12bb2f40d0d59b92834a7c0ee using one of the API to download assets, the Content-Disposition filename is no more honoured by the browser, causing the file downloaded to have weird names (windows_64) and no extensions in case of exe files: /download/channel/beta/windows_64?filetype=exe /download/channel/beta/windows_64?filetype=zip

I think also other APIs are affected by the same problem.

verhyppo avatar Mar 30 '21 10:03 verhyppo

Having the same problem. The Content-Disposition Header looks malformed:

image

OFMaurice avatar Apr 26 '21 12:04 OFMaurice

Same problem here, when I go to /download/latest, the file name on the save dialog is latest and it has no file extension

pmoncunill avatar May 06 '21 14:05 pmoncunill

I'm not sure if this is malformed based on some of the discussions in https://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http. I wonder if we could do some kind of hybrid approach like:

Content-Disposition: attachment; filename="Setup.exe"; filename*=utf-8''Setup.exe

This looks like a wonky/tricky header anyway. I have a concern that https://github.com/ArekSredzki/electron-release-server/pull/277 may cause issues with whatever was done in https://github.com/ArekSredzki/electron-release-server/pull/244.

DustinBrett avatar May 28 '21 18:05 DustinBrett

Closing since this has been fixed in 4dc7046

Please let me know if you run into further issues!

ArekSredzki avatar Dec 20 '22 12:12 ArekSredzki