Author: ssievers
Date: Thu Mar  1 19:41:10 2012
New Revision: 1295757

URL: http://svn.apache.org/viewvc?rev=1295757&view=rev
Log:
SHINDIG-1450 | io argument REFRESH_INTERVAL=0 is ignored | Patch from Brian 
Lillie, thanks

Modified:
    shindig/trunk/features/src/main/javascript/features/core.io/io.js
    shindig/trunk/features/src/test/javascript/features/core.io/iotest.js

Modified: shindig/trunk/features/src/main/javascript/features/core.io/io.js
URL: 
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.io/io.js?rev=1295757&r1=1295756&r2=1295757&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/core.io/io.js (original)
+++ shindig/trunk/features/src/main/javascript/features/core.io/io.js Thu Mar  
1 19:41:10 2012
@@ -443,8 +443,12 @@ gadgets.io = function() {
               null, 'GET', params, processResponse);
 
         } else {
+          var extraparams = gadgets.io.encodeValues(paramData);
+          if (httpMethod === 'GET' && refreshInterval == 0) {
+            extraparams = extraparams + "&refresh=0";
+          }
           makeXhrRequest(url, proxyUrl, callback,
-              gadgets.io.encodeValues(paramData), 'POST', params,
+              extraparams, 'POST', params,
               processResponse);
         }
       }

Modified: shindig/trunk/features/src/test/javascript/features/core.io/iotest.js
URL: 
http://svn.apache.org/viewvc/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js?rev=1295757&r1=1295756&r2=1295757&view=diff
==============================================================================
--- shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 
(original)
+++ shindig/trunk/features/src/test/javascript/features/core.io/iotest.js Thu 
Mar  1 19:41:10 2012
@@ -179,7 +179,7 @@ IoTest.prototype.testNoMethod_disableRef
   var req = new fakeXhr.Expectation("POST", "http://example.com/json";);
   this.setStandardArgs(req, true);
   req.setBodyArg("url", "http://target.example.com/somepage";);
-  req.setBodyArg("refresh", null);
+  req.setBodyArg("refresh", "0");
   req.setHeader("Content-Type", "application/x-www-form-urlencoded");
 
   var resp = this.makeFakeResponse(


Reply via email to