You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/06/10 13:29:17 UTC
svn commit: r666068 - /incubator/shindig/trunk/php/index.php
Author: chabotc
Date: Tue Jun 10 04:29:17 2008
New Revision: 666068
URL: http://svn.apache.org/viewvc?rev=666068&view=rev
Log:
Temporary hack to support both /proxy and /makeRequest url's through the same servlet. This will be seperated into 2 different servlets later. See SHINDIG-370
Modified:
incubator/shindig/trunk/php/index.php
Modified: incubator/shindig/trunk/php/index.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/index.php?rev=666068&r1=666067&r2=666068&view=diff
==============================================================================
--- incubator/shindig/trunk/php/index.php (original)
+++ incubator/shindig/trunk/php/index.php Tue Jun 10 04:29:17 2008
@@ -68,13 +68,14 @@
}
$servletMap = array(
- Config::get('web_prefix') . '/gadgets/files' => 'FilesServlet',
- Config::get('web_prefix') . '/gadgets/js' => 'JsServlet',
- Config::get('web_prefix') . '/gadgets/proxy' => 'ProxyServlet',
- Config::get('web_prefix') . '/gadgets/ifr' => 'GadgetRenderingServlet',
- Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
- Config::get('web_prefix') . '/social/data' => 'GadgetDataServlet',
- Config::get('web_prefix') . '/public.crt' => 'CertServlet'
+ Config::get('web_prefix') . '/gadgets/files' => 'FilesServlet',
+ Config::get('web_prefix') . '/gadgets/js' => 'JsServlet',
+ Config::get('web_prefix') . '/gadgets/proxy' => 'ProxyServlet',
+ Config::get('web_prefix') . '/gadgets/makeRequest' => 'ProxyServlet',
+ Config::get('web_prefix') . '/gadgets/ifr' => 'GadgetRenderingServlet',
+ Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
+ Config::get('web_prefix') . '/social/data' => 'GadgetDataServlet',
+ Config::get('web_prefix') . '/public.crt' => 'CertServlet'
);
// Try to match the request url to our servlet mapping
@@ -82,6 +83,11 @@
$uri = $_SERVER["REQUEST_URI"];
foreach ($servletMap as $url => $class) {
if (substr($uri, 0, strlen($url)) == $url) {
+ //FIXME temporary hack to support both /proxy and /makeRequest with the same event handler
+ // /makeRequest == /proxy?output=js
+ if ($url == Config::get('web_prefix') . '/gadgets/makeRequest') {
+ $_GET['output'] = 'js';
+ }
$servlet = $class;
break;
}