Menu

#6 Fix Content-Type for JSON Export

v1.0 (example)
open
nobody
None
5
2014-04-15
2014-04-15
Frog23
No

When exporting a vocabulary to json, the server sends the Content-Type "application/xml" but it should be "application/json". This can easily (but maybe not elegantly) be fixed by adding the line

header('Content-type: application/json');

infront of

echo do_json($_GET[jsonTema]);

in line 48 in xml.php. Maybe for some of the other export formats, the content type also needs to be adjusted, I have not looked into this.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB