Skip to content

Commit 71d1798

Browse files
author
dmitry
committed
Fixed bug #13309: t3lib_div::getURL curl connection has no connection timeout
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8190 709f56b5-9817-0410-a4d7-c38de5d9e867
1 parent 3ccb504 commit 71d1798

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Fixed bug #6208: zlib must be compiled in to make an extension lookup
44
* Fixed bug #12322: cHash is generated when no parameters are given
5+
* Fixed bug #13309: t3lib_div::getURL curl connection has no connection timeout
56

67
2010-07-13 Jeff Segars <[email protected]>
78

t3lib/class.t3lib_div.php

+1
Original file line numberDiff line numberDiff line change
@@ -2817,6 +2817,7 @@ public static function getURL($url, $includeHeader = 0, $requestHeaders = false,
28172817
curl_setopt($ch, CURLOPT_HTTPGET, $includeHeader == 2 ? 'HEAD' : 'GET');
28182818
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
28192819
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
2820+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, max(0, intval($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlTimeout'])));
28202821

28212822
// may fail (PHP 5.2.0+ and 5.1.5+) when open_basedir or safe_mode are enabled
28222823
$followLocation = @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

t3lib/config_default.php

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
'curlProxyServer' => '', // String: Proxyserver as http://proxy:port/.
7979
'curlProxyTunnel' => FALSE, // Boolean: If set, use a tunneled connection through the proxy (usefull for websense etc.).
8080
'curlProxyUserPass' => '', // String: Proxyserver authentication user:pass.
81+
'curlTimeout' => 0, // Integer: Timeout value for cURL requests in seconds. 0 means to wait indefinitely.
8182
'form_enctype' => 'multipart/form-data', // String: This is the default form encoding type for most forms in TYPO3. It allows for file uploads to be in the form. However if file-upload is disabled for your PHP version even ordinary data sent with this encryption will not get to the server. So if you have file_upload disabled, you will have to change this to eg. 'application/x-www-form-urlencoded'
8283
'textfile_ext' => 'txt,html,htm,css,tmpl,js,sql,xml,csv,' . PHP_EXTENSIONS_DEFAULT, // Text file extensions. Those that can be edited. Executable PHP files may not be editable in webspace if disallowed!
8384
'contentTable' => '', // This is the page-content table (Normally 'tt_content')

0 commit comments

Comments
 (0)