You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/07/19 10:23:07 UTC
svn commit: r965383 -
/shindig/trunk/php/src/gadgets/templates/DataPipelining.php
Author: lindner
Date: Mon Jul 19 08:23:07 2010
New Revision: 965383
URL: http://svn.apache.org/viewvc?rev=965383&view=rev
Log:
SHINDIG-1388 | Patch from Bastian Hofmann | DataPipelining Requests do not create the correct shindig url, if shindig is not running on port 80
Modified:
shindig/trunk/php/src/gadgets/templates/DataPipelining.php
Modified: shindig/trunk/php/src/gadgets/templates/DataPipelining.php
URL: http://svn.apache.org/viewvc/shindig/trunk/php/src/gadgets/templates/DataPipelining.php?rev=965383&r1=965382&r2=965383&view=diff
==============================================================================
--- shindig/trunk/php/src/gadgets/templates/DataPipelining.php (original)
+++ shindig/trunk/php/src/gadgets/templates/DataPipelining.php Mon Jul 19 08:23:07 2010
@@ -136,8 +136,8 @@ class DataPipelining {
/**
* Peforms the actual http fetching of the data-pipelining requests, all social requests
- * are made to $_SERVER['SERVER_NAME'] (the virtual host name of this server) / (optional) web_prefix / social / rpc, and
- * the httpRequest's are made to $_SERVER['SERVER_NAME'] (the virtual host name of this server) / (optional) web_prefix / gadgets / makeRequest
+ * are made to $_SERVER['HTTP_HOST'] (the virtual host name of this server) / (optional) web_prefix / social / rpc, and
+ * the httpRequest's are made to $_SERVER['HTTP_HOST'] (the virtual host name of this server) / (optional) web_prefix / gadgets / makeRequest
* both request types use the current security token ($_GET['st']) when performing the requests so they happen in the correct context
*
* @param array $requests
@@ -180,7 +180,7 @@ class DataPipelining {
}
if (count($jsonRequests)) {
// perform social api requests
- $request = new RemoteContentRequest('http://'.$_SERVER['SERVER_NAME'] . Config::get('web_prefix') . '/social/rpc?st=' . urlencode($securityToken) . '&format=json', "Content-Type: application/json\n", json_encode($jsonRequests));
+ $request = new RemoteContentRequest('http://'.$_SERVER['HTTP_HOST'] . Config::get('web_prefix') . '/social/rpc?st=' . urlencode($securityToken) . '&format=json', "Content-Type: application/json\n", json_encode($jsonRequests));
$request->setMethod('POST');
$remoteFetcherClass = Config::get('remote_content_fetcher');
$remoteFetcher = new $remoteFetcherClass();
@@ -191,7 +191,7 @@ class DataPipelining {
if (count($httpRequests)) {
$requestQueue = array();
foreach ($httpRequests as $request) {
- $req = new RemoteContentRequest($_SERVER['SERVER_NAME'] . Config::get('web_prefix') . '/gadgets/makeRequest?url=' . urlencode($request['url']) . '&st=' . urlencode($securityToken) . (! empty($request['queryStr']) ? '&' . $request['queryStr'] : ''));
+ $req = new RemoteContentRequest($_SERVER['HTTP_HOST'] . Config::get('web_prefix') . '/gadgets/makeRequest?url=' . urlencode($request['url']) . '&st=' . urlencode($securityToken) . (! empty($request['queryStr']) ? '&' . $request['queryStr'] : ''));
$req->getOptions()->ignoreCache = $context->getIgnoreCache();
$req->setNotSignedUri($request['url']);
$requestQueue[] = $req;