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

Per-domain Accept header #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current method of adding application/json to the default HTTP Accept header 
causes too many problems by default.

Although it can currently be disabled by preference, it would be better if it 
could be activated only for user-specified domains.

Work on support for JavaScript MIME types would probably make this sort of 
thing easier to accomplish, so blocking on that for now.

Original issue reported on code.google.com by W.Elwoo...@gmail.com on 21 Jun 2011 at 1:29

GoogleCodeExporter commented 9 years ago
Current implementation works fine single-process, but in Fennec's Electrolysis 
world the content preferences service won't allow access to our content 
preferences from content processes - just what I'd have expected with those 
names... We're also limited to Gecko7+ because there would be no interface for 
users to alter the content preferences in older browsers.

Consequently, implementation will change to use ordinary preferences that 
anybody can change from about:config.

Oh and unblocked from JS MIME support, not actually in the same area.

Original comment by W.Elwoo...@gmail.com on 27 Aug 2011 at 6:11

GoogleCodeExporter commented 9 years ago
Implemented in r142. When a request is made to an overridden host, the JSON 
MIME type is added to the outgoing Accept header with the specified q-value (0 
removes it). Non-overridden hosts continue to use the default Accept header 
setting, which is now defaulted to off.

Users of browsers based on Gecko 7 and above can customise hosts to override on 
the options page with everything else.

Users of older browsers can find a couple of examples in about:config under 
extensions.jsonovich.acceptHeaderOverride.json - just create a new string entry 
with a similar name for your own host and set the value to your desired HTTP 
q-value (0 <= q <= 1, no more than 3 decimals).

Original comment by W.Elwoo...@gmail.com on 27 Aug 2011 at 9:33