Project

General

Profile

Actions

Bug #14916

closed

t3lib_div::getURL() uses cURL only for http protocol

Added by Thorsten Kahler almost 19 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-08-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

t3lib_div::getURL($url) checks whether the string parameter $url starts with 'http://'. All URLs not fitting to this pattern are opened by fopen().
IMHO this restriction is not neccessary because cURL [1] is able to handle more than half a dozen protocols.
I appended a patch file as an example. It enables ftp, ftps, http, https, gopher and telnet to be red via cURL. cURL options may be set as TYPO3_CONF_VARS or as an optional second parameter of t3lib_div::getURL().

Are there any reasons not to use cURL for those other protocols?

[1] cURL: http://curl.haxx.se/
[2] cURL-functions of PHP: http://www.php.net/manual/en/ref.curl.php
(issue imported from #M1364)


Files

t3lib_div.patch (781 Bytes) t3lib_div.patch Administrator Admin, 2005-08-10 13:55
bug_1364_v2.diff (1.91 KB) bug_1364_v2.diff Administrator Admin, 2007-07-06 18:06
bug_1364_v3.diff (1.98 KB) bug_1364_v3.diff Administrator Admin, 2007-07-06 18:25

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #16976: t3lib_div::getURL breaks on some optionsClosedMartin Kutschker2007-02-12

Actions
Actions #1

Updated by Michael Stucki over 18 years ago

I'm going to fix this. Forgive me Karsten ;-)

Actions #2

Updated by Martin Kutschker over 17 years ago

I think so too. And IMHO this can safley be added - after one year - into 4.1RC2. I assume that CURL is stable for all protocols.

Actions #3

Updated by Michael Stucki over 17 years ago

Thorsten or Martin, can one of you please take over?

Actions #4

Updated by Michael Stucki about 17 years ago

Attached is a new version of the patch, made against Trunk @ revision 2377.

Note that other than in the first patch, I didn't remove the three first curl_setopt calls (because Iiii think that this would break the functionality).

Additionally, I have to mention that I can't test the patch right here, so I would be glad if Thorsten will take it over again...

Actions #5

Updated by Michael Stucki about 17 years ago

Forget bug_1364_v2.diff please! It contained a syntax error.

I've fixed this in bug_1364_v3.diff and also modified the $TYPO3_CONF_VARS['SYS']['curl'] parameter to be a string (multiline). This way it can be possible to edit the settings using the install tool (see "setDBinit" property).

Last but not least, I think that the properties "curlUse" and "curl" could be merged into one. But this still needs to be done...

Actions #6

Updated by Michael Stucki almost 17 years ago

Hi Thorsten, can you please test my patch and submit it to the core list, please?

Actions #7

Updated by Ingmar Schlecht over 16 years ago

Stucki sent the reminder by accident to Thorsten Koensgen, it should have been Thorsten Kahler. So Thorsten, can you send the patch, please?

cheers
Ingmar

Actions #8

Updated by Ingo Renner over 16 years ago

coul also be considered to be a featuer

Actions #9

Updated by Martin Kutschker over 16 years ago

Fixed in SVN for http, https, ftp, ftps, sftp and scp. Other protocols like telnet won't work reasonably with getURL().

Actions

Also available in: Atom PDF