From a8fb681bfc6c8158732ff9d7d0ad90fc46c9fa36 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 29 Jan 2013 04:15:47 +0100 Subject: [PATCH] Always convert method passed to Travis.ajax to upper case --- assets/scripts/lib/travis/ajax.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/scripts/lib/travis/ajax.coffee b/assets/scripts/lib/travis/ajax.coffee index 043bf992..1526e7f3 100644 --- a/assets/scripts/lib/travis/ajax.coffee +++ b/assets/scripts/lib/travis/ajax.coffee @@ -12,6 +12,7 @@ jQuery.support.cors = true @ajax(url, 'post', data: data, success: callback) ajax: (url, method, options) -> + method = method.toUpperCase() endpoint = Travis.config.api_endpoint || '' options = options || {} @@ -25,7 +26,7 @@ jQuery.support.cors = true options.contentType = options.contentType || 'application/json; charset=utf-8' options.context = this - if options.data && method != 'GET' && method != 'get' + if options.data && method != 'GET' options.data = JSON.stringify(options.data) success = options.success || (->)