Explorar el Código

AMBARI-1503. Ajax call sometimes adds multiple question marks in the query causing bad requests. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1450502 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako hace 12 años
padre
commit
b219c06380
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. 3 0
      CHANGES.txt
  2. 1 1
      ambari-web/app/utils/http_client.js

+ 3 - 0
CHANGES.txt

@@ -376,6 +376,9 @@ Trunk (unreleased changes):
 
 
  BUG FIXES
  BUG FIXES
 
 
+ AMBARI-1503. Ajax call sometimes adds multiple question marks in the query
+ causing bad requests. (yusaku)
+
  AMBARI-1463. State of HBase region server not updated when instance is shut down on a cluster not installed via Ambari. (tbeerbower)
  AMBARI-1463. State of HBase region server not updated when instance is shut down on a cluster not installed via Ambari. (tbeerbower)
  
  
  AMBARI-1494. Browser memory consumption issues. (jaimin)
  AMBARI-1494. Browser memory consumption issues. (jaimin)

+ 1 - 1
ambari-web/app/utils/http_client.js

@@ -57,7 +57,7 @@ App.HttpClient = Em.Object.create({
     var xhr = new XMLHttpRequest();
     var xhr = new XMLHttpRequest();
     var curTime = new Date().getTime();
     var curTime = new Date().getTime();
 
 
-    xhr.open('GET', url + "?_=" + curTime, true);
+    xhr.open('GET', url + (url.indexOf('?') >= 0 ? '&_=' : '?_=') + curTime, true);
     xhr.send(null);
     xhr.send(null);
 
 
     this.onReady(xhr, "", ajaxOptions, mapper, errorHandler);
     this.onReady(xhr, "", ajaxOptions, mapper, errorHandler);