This commit is contained in:
Régis Hanol 2015-07-31 15:22:30 +02:00
parent 8f435fcbf6
commit d7aa4e81d6
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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