Support » Plugin: JSON API » [Plugin: JSON API] Strange behaviour with JSON output and Chunked transfer encoding

  • Resolved parse

    (@parse)


    I’ve described the whole issue over at stackoverflow.

    The solution was to set the content-length in singletons/response.php:

    function output($result) {
        $charset = get_option('blog_charset');
        if (!headers_sent()) {
          header('HTTP/1.1 200 OK', true);
          header("Content-Type: application/json; charset=$charset", true);
          header("Content-Length: " . strlen($result));
        }
    
        echo $result;
      }

    http://wordpress.org/extend/plugins/json-api/

  • The topic ‘[Plugin: JSON API] Strange behaviour with JSON output and Chunked transfer encoding’ is closed to new replies.