X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=www%2Fserve-analysis.js;h=cfc5f15e40f4395dfc98d910068b0d9ef6c699de;hb=778e663fc0fd4657d78c8a6d27ea14e120cfb025;hp=edb4a18a9db7b6a933d77771f244806995525304;hpb=f958c7696910d2d096d5662689ba133876d5dabe;p=remoteglot-book diff --git a/www/serve-analysis.js b/www/serve-analysis.js index edb4a18..cfc5f15 100644 --- a/www/serve-analysis.js +++ b/www/serve-analysis.js @@ -187,10 +187,12 @@ var send_json = function(response, ims, accept_gzip, num_viewers) { }; if (accept_gzip) { + headers['Content-Length'] = this_json.gzip.length; headers['Content-Encoding'] = 'gzip'; response.writeHead(200, headers); response.write(this_json.gzip); } else { + headers['Content-Length'] = this_json.text.length; response.writeHead(200, headers); response.write(this_json.text); }