json-lite icon indicating copy to clipboard operation
json-lite copied to clipboard

Extension tries to display .jar files as JSON

Open TheSkullbot opened this issue 5 years ago • 1 comments

Bug :

  • Trying to access to a .jar file URL activate the JSON viewer (and obviously with an unexpected token error because it's a Java archive and not JSON)

How to reproduce :

  • Access some .jar file URL (like https://media.forgecdn.net/files/3060/564/RebornCore-1.16-4.4.2%2Bbuild.73.jar)
  • The browser won't ask for action (either open or save) and the default action for this filetype will be ignored

Expected behavior :

  • Don't treat .jar files as JSON and open the dialog or perform the configured action for this filetype

Versions :

  • Firefox 81.0.1 (64 bits)
  • JSON Lite 19.6.0

TheSkullbot avatar Oct 11 '20 00:10 TheSkullbot

$ curl -I https://media.forgecdn.net/files/3060/564/RebornCore-1.16-4.4.2%2Bbuild.73.jar
HTTP/1.1 200 OK
Content-Type: application/x-amz-json-1.0

JSON Lite kicks in when there is json in Content-Type header. Will think which workaround would be best for misconfigured servers.

lauriro avatar Oct 11 '20 16:10 lauriro