You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by wu...@apache.org on 2022/11/10 17:56:01 UTC

[ambari] branch trunk updated: AMBARI-25181: Host registration through Ambari UI failed with an error "Unsupported Media Type" (#3477)

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

wuzhiguo pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 2d4a401a71 AMBARI-25181: Host registration through Ambari UI failed with an error "Unsupported Media Type" (#3477)
2d4a401a71 is described below

commit 2d4a401a71baa07e5ee0bae56fd575acdac63ceb
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Fri Nov 11 01:55:55 2022 +0800

    AMBARI-25181: Host registration through Ambari UI failed with an error "Unsupported Media Type" (#3477)
---
 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 308c07121b..89b772b10d 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -3321,7 +3321,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';
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org