This is an automated email from the ASF dual-hosted git repository.

amagyar pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 28b6ea1  AMBARI-25181. Host registration through Ambari UI failed with 
an error "Unsupported Media Type" (amagyar) (#2848) (#3011)
28b6ea1 is described below

commit 28b6ea164c2770fd6126671731b68d3c612fa187
Author: Attila Magyar <m.magy...@gmail.com>
AuthorDate: Fri Jun 14 14:51:31 2019 +0200

    AMBARI-25181. Host registration through Ambari UI failed with an error 
"Unsupported Media Type" (amagyar) (#2848) (#3011)
---
 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 12e12b1..2401c08 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -3275,7 +3275,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';
   }

Reply via email to