Rob--W / open-in-browser

A browser extension that offers the ability to open files directly in the browser instead of downloading them.
Other
88 stars 16 forks source link

Extension dialog not showing for a PDF link #65

Closed ly4096x closed 4 years ago

ly4096x commented 4 years ago

The following link doesn't trigger the extension dialog to show up:

https://www.st.com/resource/en/datasheet/vl53l1x.pdf

Rob--W commented 4 years ago

That PDF document can directly be viewed in the browser. The server did not ask the browser to show a download dialog.

If you want to override the server's suggestion, then you can use the following option:

ly4096x commented 4 years ago

Thank you for your response. The option you mentioned works well, but I'd like to know if I can force the extension dialog to pop up for links like this? This link never opens in my browser no matter if I click on it or paste it to a new tab, and it can even bypass your extension.

Rob--W commented 4 years ago

Fixed in version 2.10. Please give it a try, and close the issue if it resolves your issue.

The server did not ask the browser to show a download dialog.

I have to correct myself; the server replied with an unknown Content-Disposition response header value (i.e. an unsupported non-standard value).

According to RFC 6266, section 4.2, that needs to be treated as a download (i.e. "attachment"):

Unknown or unhandled disposition types SHOULD be handled by recipients the same way as "attachment"

ly4096x commented 4 years ago

Confirmed working. Thank you for fixing this! Happy new year!