WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
[resolved] Strange behaviour with JSON output and Chunked transfer encoding (1 post)

  1. parse
    Member
    Posted 3 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags