From: Steinar H. Gunderson Date: Tue, 25 Nov 2014 17:25:39 +0000 (+0100) Subject: More header squeezing. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=9386e66cca3bbde38e9d59941a3b3cd1ed736913 More header squeezing. --- diff --git a/default.vcl b/default.vcl index e0fbc45..38631cb 100644 --- a/default.vcl +++ b/default.vcl @@ -51,7 +51,7 @@ sub vcl_backend_response { } if (beresp.http.content-type ~ "json") { set beresp.http.x-analysis = 1; - ban ( "obj.http.x-analysis == 1 && obj.http.x-remoteglot-last-modified != " + beresp.http.x-remoteglot-last-modified ); + ban ( "obj.http.x-analysis == 1 && obj.http.x-rglm != " + beresp.http.x-rglm ); } return (deliver); } diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 3c85e67..0f56b5b 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -135,8 +135,8 @@ var request_update = function() { url: "/analysis.pl?ims=" + ims + "&unique=" + unique }).done(function(data, textstatus, xhr) { sync_server_clock(xhr.getResponseHeader('Date')); - ims = xhr.getResponseHeader('X-Remoteglot-Last-Modified'); - var num_viewers = xhr.getResponseHeader('X-Remoteglot-Num-Viewers'); + ims = xhr.getResponseHeader('X-RGLM'); + var num_viewers = xhr.getResponseHeader('X-RGNV'); possibly_play_sound(current_analysis_data, data); if (Array.isArray(data)) { current_analysis_data = JSON_delta.patch(current_analysis_data, data); diff --git a/www/serve-analysis.js b/www/serve-analysis.js index cfc5f15..948ea96 100644 --- a/www/serve-analysis.js +++ b/www/serve-analysis.js @@ -180,9 +180,9 @@ var send_json = function(response, ims, accept_gzip, num_viewers) { var headers = { 'Content-Type': 'text/json', - 'X-Remoteglot-Last-Modified': this_json.last_modified, - 'X-Remoteglot-Num-Viewers': num_viewers, - 'Access-Control-Expose-Headers': 'X-Remoteglot-Last-Modified, X-Remoteglot-Num-Viewers', + 'X-RGLM': this_json.last_modified, + 'X-RGNV': num_viewers, + 'Access-Control-Expose-Headers': 'X-RGLM, X-RGNV', 'Vary': 'Accept-Encoding', };