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 e0fbc45..38631cb 100644 (file)
@@ -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);
     }
index 3c85e67..0f56b5b 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'));
-               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);
index cfc5f15..948ea96 100644 (file)
@@ -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',
        };