From eb2feca02aaacb4ae91381ff0e54a93e6a309eef Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 28 Jan 2013 18:18:16 +0100 Subject: [PATCH] Set proper content type for logs requests --- assets/scripts/app/models/artifact.coffee | 1 + assets/scripts/lib/travis/ajax.coffee | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/scripts/app/models/artifact.coffee b/assets/scripts/app/models/artifact.coffee index 2aaa9eb5..091f86d5 100644 --- a/assets/scripts/app/models/artifact.coffee +++ b/assets/scripts/app/models/artifact.coffee @@ -24,6 +24,7 @@ require 'travis/model' self = this Travis.ajax.ajax "/jobs/#{@get('job.id')}/log.txt", 'GET', dataType: 'text' + contentType: 'text/plain' success: (data) -> self.set 'body', data self.set 'isLoaded', true diff --git a/assets/scripts/lib/travis/ajax.coffee b/assets/scripts/lib/travis/ajax.coffee index b7589ebb..043bf992 100644 --- a/assets/scripts/lib/travis/ajax.coffee +++ b/assets/scripts/lib/travis/ajax.coffee @@ -22,7 +22,7 @@ jQuery.support.cors = true options.url = "#{endpoint}#{url}" options.type = method options.dataType = options.dataType || 'json' - options.contentType = 'application/json; charset=utf-8' + options.contentType = options.contentType || 'application/json; charset=utf-8' options.context = this if options.data && method != 'GET' && method != 'get'