From d7aa4e81d681f2ebb909244ffcb910d6e3e36a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 31 Jul 2015 15:22:30 +0200 Subject: [PATCH] revert 8f435fcbf6f8dc --- app/assets/javascripts/discourse/mixins/ajax.js | 3 ++- lib/middleware/request_tracker.rb | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/mixins/ajax.js b/app/assets/javascripts/discourse/mixins/ajax.js index 1b8e2b626ae..6817150d515 100644 --- a/app/assets/javascripts/discourse/mixins/ajax.js +++ b/app/assets/javascripts/discourse/mixins/ajax.js @@ -47,7 +47,8 @@ Discourse.Ajax = Em.Mixin.create({ if (_trackView && (!args.type || args.type === "GET")) { _trackView = false; - args.headers['HTTP_DISCOURSE_TRACK_VIEW'] = true; + // DON'T CHANGE: rack is prepending "HTTP_" in the header's name + args.headers['DISCOURSE_TRACK_VIEW'] = true; } args.success = function(data, textStatus, xhr) { diff --git a/lib/middleware/request_tracker.rb b/lib/middleware/request_tracker.rb index 6a0b4d3d0c5..7c5ab1ab7b0 100644 --- a/lib/middleware/request_tracker.rb +++ b/lib/middleware/request_tracker.rb @@ -47,7 +47,6 @@ class Middleware::RequestTracker TRACK_VIEW = "HTTP_DISCOURSE_TRACK_VIEW".freeze CONTENT_TYPE = "Content-Type".freeze def self.get_data(env,result) - status,headers = result status = status.to_i