Author: chabotc
Date: Mon Nov 10 07:36:48 2008
New Revision: 712678
URL: http://svn.apache.org/viewvc?rev=712678&view=rev
Log:
Increase the curl connection timeout, the 2 second value was causing problems
for some people. Also made the value configurable
Modified:
incubator/shindig/trunk/php/config/container.php
incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
Modified: incubator/shindig/trunk/php/config/container.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/config/container.php?rev=712678&r1=712677&r2=712678&view=diff
==============================================================================
--- incubator/shindig/trunk/php/config/container.php (original)
+++ incubator/shindig/trunk/php/config/container.php Mon Nov 10 07:36:48 2008
@@ -117,6 +117,10 @@
// If you use CacheFile as caching backend, this is the directory where
it stores the temporary files
'cache_root' => '/tmp/shindig',
+ // connection timeout setting for all curl requests, set this time
something low if you want errors reported
+ // quicker to the end user, and high (between 10 and 20) if your on a
slow connection
+ 'curl_connection_timeout' => '10',
+
// If your development server is behind a proxy, enter the proxy
details here in 'proxy.host.com:port' format.
'proxy' => ''
);
Modified:
incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php?rev=712678&r1=712677&r2=712678&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
(original)
+++ incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
Mon Nov 10 07:36:48 2008
@@ -33,7 +33,7 @@
curl_setopt($request->handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($request->handle, CURLOPT_AUTOREFERER, 1);
curl_setopt($request->handle, CURLOPT_MAXREDIRS, 10);
- curl_setopt($request->handle, CURLOPT_CONNECTTIMEOUT, 2);
+ curl_setopt($request->handle, CURLOPT_CONNECTTIMEOUT,
Config::get('curl_connection_timeout'));
curl_setopt($request->handle, CURLOPT_TIMEOUT, 2);
curl_setopt($request->handle, CURLOPT_HEADER, 1);
curl_setopt($request->handle, CURLOPT_SSL_VERIFYPEER, 0);
@@ -93,7 +93,7 @@
curl_setopt($request->handle, CURLOPT_RETURNTRANSFER,
1);
curl_setopt($request->handle, CURLOPT_AUTOREFERER, 1);
curl_setopt($request->handle, CURLOPT_MAXREDIRS, 10);
- curl_setopt($request->handle, CURLOPT_CONNECTTIMEOUT,
2);
+ curl_setopt($request->handle, CURLOPT_CONNECTTIMEOUT,
Config::get('curl_connection_timeout'));
curl_setopt($request->handle, CURLOPT_TIMEOUT, 2);
curl_setopt($request->handle, CURLOPT_HEADER, 1);
curl_setopt($request->handle, CURLOPT_SSL_VERIFYPEER,
0);