]> git.sesse.net Git - remoteglot/commitdiff
More header squeezing.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 25 Nov 2014 17:25:39 +0000 (18:25 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 25 Nov 2014 17:37:54 +0000 (18:37 +0100)
default.vcl
www/js/remoteglot.js
www/serve-analysis.js

index e0fbc4555c20be4c1938a906fedee322ae4f898c..38631cb4f1d3c6f399dd4fb1378dec993339aa32 100644 (file)
@@ -51,7 +51,7 @@ sub vcl_backend_response {
         }
         if (beresp.http.content-type ~ "json") {
              set beresp.http.x-analysis = 1;
         }
         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);
     }
         }
         return (deliver);
     }
index 3c85e672e0a66b57bebc8e1a79b1b2f798dc9735..0f56b5b206dbc4b7d69d549f8a0f44827d978f90 100644 (file)
@@ -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'));
                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);
                possibly_play_sound(current_analysis_data, data);
                if (Array.isArray(data)) {
                        current_analysis_data = JSON_delta.patch(current_analysis_data, data);
index cfc5f15e40f4395dfc98d910068b0d9ef6c699de..948ea967c643b5fec2eddd67d02be9606b14f0fe 100644 (file)
@@ -180,9 +180,9 @@ var send_json = function(response, ims, accept_gzip, num_viewers) {
 
        var headers = {
                'Content-Type': 'text/json',
 
        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',
        };
 
                'Vary': 'Accept-Encoding',
        };