Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Content-Type results in firmware files opening in the browser #53

Closed
0nelight opened this issue Oct 26, 2024 · 5 comments
Closed

Comments

@0nelight
Copy link

0nelight commented Oct 26, 2024

Download-Links to a notable amount of built Images via the Browser-Interface of the public Firmware-Selector-Server on the public ASU are being advertised as content-type: text/stream; charset=utf-8 instead of from content-type: application/octet-stream the Webserver running on ASU.

This leads to the Issue where, when clicking on the Download-Button, instead of Firefox opening the Download-File-Dialog, it interprets the File as a Webpage and tries to render it. Workaround is clicking "Save Target as".

I am not sure if I should put this here or at ASU - therefore I created a Ticket there too.

While Chrome Browser seems to take care of this misconfiguration, Firefox doesn't.

@0nelight 0nelight changed the title Download Link Opens Binary File in Browser Instead of Prompting Download (Custom Images) (Firefox) Download Link Opens Binary File in Browser Instead of Prompting Download (Custom Images) Oct 26, 2024
@0nelight 0nelight changed the title (Firefox) Download Link Opens Binary File in Browser Instead of Prompting Download (Custom Images) Download Link Opens Binary File in Browser Instead of Prompting Download (Custom Images) Oct 26, 2024
@mwarning
Copy link
Collaborator

I cannot reproduce the problem. With Firefox 131.0.3 the generated images are downloaded as octet-stream.
asu

@0nelight
Copy link
Author

0nelight commented Oct 26, 2024

Hmm.. strange - for what device you produced your image? You applied a custom config?

On my place here I tried with raspi3 device and set rootpw and ip and I get as content-type: text/stream; charset=utf-8 in firefox and in chrome. Chrome then does some stuff to get this right anyway, Firefox takes "text" as "text". When I download with "save file as" the image works flawlessly.

Also tried in a private window with all firefox and chrome extensions disabled - still content-type "text".

@0nelight
Copy link
Author

0nelight commented Oct 26, 2024

For "8devices Lima" you are right.. there the Type is correct octet-stream:
grafik

But for "Raspberry Pi 3B" it is not:
grafik

I suspect the "gz" compression is the reason. Maybe related to this Issue?

@AliveDevil
Copy link

AliveDevil commented Oct 26, 2024

Moved to appropriate ticket openwrt/asu#1059.

@0nelight 0nelight changed the title Download Link Opens Binary File in Browser Instead of Prompting Download (Custom Images) Incorrect Content-Type results in firmware files opening in the browser Oct 27, 2024
@mwarning
Copy link
Collaborator

Thank you for figuring this out. Let me close this ticket and hope this will get fixed on the ASU side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants