JSONovich / jsonovich

A webextension for Firefox. Pretty-prints JSON content in the browser for easy, unobtrusive viewing.
https://addons.mozilla.org/firefox/addon/jsonovich/
Mozilla Public License 2.0
7 stars 3 forks source link

MIME type comparison should strip parameters (e.g. charset) #39

Closed GoogleCodeExporter closed 7 years ago

GoogleCodeExporter commented 9 years ago
It looks as though comparisons for MIME types are too specific. To process a 
response with "Content-Type: application/json;charset=utf-8" the user needs to 
add this entire string to the intercept list, which rapidly becomes unwieldy 
when dealing with multiple servers, types and charsets. If possible, this 
should be stripped before comparison.

v1.6.9.1

Original issue reported on code.google.com by choccybi...@googlemail.com on 18 Jul 2013 at 2:20

GoogleCodeExporter commented 9 years ago
Hi, the MIME type matching is handled by a service built into the browser with 
which JSONovich merely registers interest. This makes it efficient since it 
doesn't add any extra processing to normal non-JSON browsing, but it also means 
it's subject to the way that service works.

Technically JSON is always Unicode anyway (UTF-8 by default and the only other 
options are UTF-16 and UTF-32) but since this is the real world I imagine there 
are many servers that don't follow the standard.

Now to the part you probably really don't want to hear... I can't reproduce 
this problem. I have test files on my own server (Apache 2.2.14 on Ubuntu 
10.04.4) that contain Cyrillic characters encoded with various character sets 
(ISO8859-5, KOI8-R, etc) and served with an appropriate Content-Type header. 
All of them are intercepted by JSONovich 1.9.6.1 (I assume your given version 
was a typo) with default options in Firefox 22.0 on Windows Server 2012. Could 
you provide a link to a problem file and/or more details on your setup?

Original comment by W.Elwoo...@gmail.com on 18 Jul 2013 at 4:54