Repository: thrift Updated Branches: refs/heads/master de7cf5df9 -> 55c3abcb6
Revert "THRIFT-2674 JavaScript: declare Accept: and Content-Type: in request" This reverts commit 1e723d931e92652e4ccb1385709258759ae5bc54. Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/55c3abcb Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/55c3abcb Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/55c3abcb Branch: refs/heads/master Commit: 55c3abcb63f948f18a6db25c51c8a887373ed369 Parents: de7cf5d Author: henrique <[email protected]> Authored: Mon May 4 21:04:53 2015 +1000 Committer: henrique <[email protected]> Committed: Mon May 4 21:05:48 2015 +1000 ---------------------------------------------------------------------- lib/js/src/thrift.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/55c3abcb/lib/js/src/thrift.js ---------------------------------------------------------------------- diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js index ada28ba..35f679c 100644 --- a/lib/js/src/thrift.js +++ b/lib/js/src/thrift.js @@ -327,11 +327,7 @@ Thrift.TXHRTransport.prototype = { var xreq = this.getXmlHttpRequestObject(); if (xreq.overrideMimeType) { - xreq.overrideMimeType('application/vnd.apache.thrift.json; charset=utf-8'); - } - if (xreq.setRequestHeader) { - xreq.setRequestHeader('Accept', 'application/vnd.apache.thrift.json; charset=utf-8'); - xreq.setRequestHeader('Content-Type', 'application/vnd.apache.thrift.json; charset=utf-8'); + xreq.overrideMimeType('application/json'); } if (callback) { @@ -391,7 +387,7 @@ Thrift.TXHRTransport.prototype = { data: postData, type: 'POST', cache: false, - contentType: 'application/vnd.apache.thrift.json; charset=utf-8', + contentType: 'application/json', dataType: 'text thrift', converters: { 'text thrift' : function(responseData) {
