This is an automated email from the ASF dual-hosted git repository. amagyar pushed a commit to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.6 by this push: new f234cf1 AMBARI-25181. Host registration through Ambari UI failed with an error "Unsupported Media Type" (amagyar) (#2848) f234cf1 is described below commit f234cf159d091c9fe5f4e081ce206e2dbc2ce48c Author: Attila Magyar <m.magy...@gmail.com> AuthorDate: Wed Mar 6 13:31:30 2019 +0100 AMBARI-25181. Host registration through Ambari UI failed with an error "Unsupported Media Type" (amagyar) (#2848) --- ambari-web/app/utils/ajax/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 96a934d..17254bc 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -3141,7 +3141,7 @@ var formatRequest = function (data) { if (this.format) { jQuery.extend(opt, this.format(data, opt)); } - if (!('headers' in opt && 'Content-Type' in opt.headers)) { + if (!('headers' in opt && 'Content-Type' in opt.headers) && opt.contentType === undefined) { // With the default www-url-form-encoded Content-Type KNOX would corrupt the json content. opt.headers['Content-Type'] = 'text/plain'; }