A little serve-analysis bugfix I forgot to commit.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 Dec 2014 22:49:12 +0000 (23:49 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 Dec 2014 22:49:12 +0000 (23:49 +0100)
www/serve-analysis.js

index 948ea96..0faf92f 100644 (file)
@@ -93,8 +93,8 @@ var create_json_historic_diff = function(new_json, history_left, new_diff_json,
        zlib.gzip(diff_text, function(err, buffer) {
                if (err) throw err;
                new_diff_json[histobj.last_modified] = {
-                       plain: diff,
-                       text: diff_text,
+                       parsed: diff,
+                       plain: diff_text,
                        gzip: buffer,
                        last_modified: new_json.last_modified,
                };
@@ -192,9 +192,9 @@ var send_json = function(response, ims, accept_gzip, num_viewers) {
                response.writeHead(200, headers);
                response.write(this_json.gzip);
        } else {
-               headers['Content-Length'] = this_json.text.length;
+               headers['Content-Length'] = this_json.plain.length;
                response.writeHead(200, headers);
-               response.write(this_json.text);
+               response.write(this_json.plain);
        }
        response.end();
 }