You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by aw...@apache.org on 2009/04/07 18:44:32 UTC

svn commit: r762842 - in /incubator/shindig/trunk/features/src/main/javascript/features: core.io/io.js flash/flash.js

Author: awiner
Date: Tue Apr  7 16:44:32 2009
New Revision: 762842

URL: http://svn.apache.org/viewvc?rev=762842&view=rev
Log:
Support schemeless URLs for XHR and flash

Modified:
    incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js
    incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js

Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js?rev=762842&r1=762841&r2=762842&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js Tue Apr  7 16:44:32 2009
@@ -199,6 +199,10 @@
       params, processResponseFunction, opt_contentType) {
     var xhr = makeXhr();
 
+    if (proxyUrl.indexOf('//') == 0) {
+      proxyUrl = document.location.protocol + proxyUrl;
+    }
+    
     xhr.open(method, proxyUrl, true);
     if (callback) {
       xhr.onreadystatechange = gadgets.util.makeClosure(

Modified: incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js?rev=762842&r1=762841&r2=762842&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js Tue Apr  7 16:44:32 2009
@@ -99,6 +99,10 @@
       return false;
   }
 
+  if (swfUrl.indexOf('//') == 0) {
+    swfUrl = document.location.protocol + swfUrl;
+  }
+  
   var ver = gadgets.flash.getMajorVersion();
   if (ver) {
     var swfVer = parseInt(swfVersion, 10);