• Hi,
    I see you have
    header(“Content-Disposition: attachment; filename=\”json_api.json\””, true);
    in the output function.
    I commented it out to be able to use plugins for Chrome to pretty-view the json in chrome without using dev=1.
    Just wondering if that header is necessary for anything in particular or if it’s safe to comment it out? Don’t have IE on my system so I can’t test with that browser, and I recall old IE having a hard time without it. Just wonder if that’s the reason for it (and if so, would like to try with ‘inline’ instead of ‘attachment’ – works well in Chrome, Safari and Firefox newest versions…)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Dan,

    I ran into the same issue. I’m using the JSONView Firefox add-on.

    With the Content-Disposition header, Firefox always offers to open or download the file. Without the Content-Disposition JSONView can do it’s magic and pretty-print the JSON in the browser window.

    I there anything against taking out the Content-Disposition header?

    Regards,

    K-J

    Plugin Author dphiffer

    (@dphiffer)

    Hi guys,

    Sorry for the slow reply.

    I’m removing that header in the next release. It was a misguided attempt at providing “nicer” filenames in case you have to do anything with a downloaded JSON file.

    Thanks for the input!

    Hi Dan,

    Thanks for your reply. In the mean-time we’ve patched our install by removing the Content-Disposition header and also adding the header(“HTTP/1.1 200 OK”) hack to get the submit_comment stuff working.

    Many thanks for you support.

    Regards,
    K-J

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: JSON API] Content-Disposition’ is closed to new replies.