Rob--W / open-in-browser

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

Asks for action with "Content-Disposition" header #66

Closed cmock closed 4 years ago

cmock commented 4 years ago

Since 2.10, the extension changed its behaviour: when a HTML page is sent with a content-disposition header like the following:

Content-Disposition: filename="AgentDashboard.html"

Now the "open in browser" dialog pops up. In earlier versions, the page was just displayed.

My interpretation of RFC 6266 is that either "inline" or "attachment" MUST be present in a Content-Disposition header, so this is a bad header; however, Firefox without the Open In Browser extension just displays the page, so I'd suggest your extension to revert back to the old behaviour...

Rob--W commented 4 years ago

Heh. This was changed to be more compliant with RFC 6266, see https://github.com/Rob--W/open-in-browser/issues/65#issuecomment-570095669

... but of course there are non-standard exceptions: https://searchfox.org/mozilla-central/rev/4537228c0a18bc0ebba2eb7f5cbebb6ea9ab211c/netwerk/base/nsNetUtil.cpp#2621-2624

I'll update the logic.

Rob--W commented 4 years ago

Fixed in 2.11.