You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/02/26 23:46:55 UTC

svn commit: r1450502 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/utils/http_client.js

Author: yusaku
Date: Tue Feb 26 22:46:54 2013
New Revision: 1450502

URL: http://svn.apache.org/r1450502
Log:
AMBARI-1503. Ajax call sometimes adds multiple question marks in the query causing bad requests. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/utils/http_client.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1450502&r1=1450501&r2=1450502&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Feb 26 22:46:54 2013
@@ -376,6 +376,9 @@ Trunk (unreleased changes):
 
  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-1494. Browser memory consumption issues. (jaimin)

Modified: incubator/ambari/trunk/ambari-web/app/utils/http_client.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/http_client.js?rev=1450502&r1=1450501&r2=1450502&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/http_client.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/http_client.js Tue Feb 26 22:46:54 2013
@@ -57,7 +57,7 @@ App.HttpClient = Em.Object.create({
     var xhr = new XMLHttpRequest();
     var curTime = new Date().getTime();
 
-    xhr.open('GET', url + "?_=" + curTime, true);
+    xhr.open('GET', url + (url.indexOf('?') >= 0 ? '&_=' : '?_=') + curTime, true);
     xhr.send(null);
 
     this.onReady(xhr, "", ajaxOptions, mapper, errorHandler);