Author: zhen
Date: Thu Jun  5 20:00:03 2008
New Revision: 663810

URL: http://svn.apache.org/viewvc?rev=663810&view=rev
Log:
Added support for %rawurl% for the configuration of proxyUrl.

Containers can now set proxyUrl to "http://host/gadgets/proxy//%rawurl%"; or 
"http://host/gadgets/proxy/refresh=%refresh%/%rawurl%"; to take advantage of the 
newly introduced chained proxy request syntax.


Modified:
    incubator/shindig/trunk/features/core.io/io.js

Modified: incubator/shindig/trunk/features/core.io/io.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/core.io/io.js?rev=663810&r1=663809&r2=663810&view=diff
==============================================================================
--- incubator/shindig/trunk/features/core.io/io.js (original)
+++ incubator/shindig/trunk/features/core.io/io.js Thu Jun  5 20:00:03 2008
@@ -237,7 +237,7 @@
   }
 
   var requiredConfig = {
-    proxyUrl: new gadgets.config.RegExValidator(/.*%url%.*/),
+    proxyUrl: new gadgets.config.RegExValidator(/.*%(raw)?url%.*/),
     jsonProxyUrl: gadgets.config.NonEmptyStringValidator
   };
   gadgets.config.register("core.io", requiredConfig, init);
@@ -388,6 +388,7 @@
       var refresh = params['REFRESH_INTERVAL'] || '3600';
 
       return config.proxyUrl.replace("%url%", encodeURIComponent(url)).
+          replace("%rawurl%", url).
           replace("%refresh%", encodeURIComponent(refresh));
     }
   };


Reply via email to