Set proper content type for logs requests

This commit is contained in:
Piotr Sarnacki 2013-01-28 18:18:16 +01:00
parent 5d3333efd2
commit eb2feca02a
2 changed files with 2 additions and 1 deletions

View File

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

View File

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