[TYPO3-core] RFC: #1364, #5985, #7624: improved version of getUrl (cUrl, CURLOPT_FOLLOWLOCATION, error reporting)

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Fri Feb 22 14:41:00 CET 2008


Hi!

This is a SVN patch request.

Problems:

#1364: t3lib_div::getURL() uses cURL only for http protocol
#5985: CURLOPT_FOLLOWLOCATION triggers error with safe_mode/open_basedir
#7624: when getURL fails there is no way to figure out why

Solutions:

#1364: Modify regexp to allow http, https, ftp, ftps, sftp and scp 
(omitting TFTP and telnet where I couldn't figure out where and how to use).

#5985: Use @ and safe/report the failure. IN 4.1.x only @ is used.

#7624: Add an error reporting array as parameter. When requesting the 
headers, this will make getUrl parse HTTP-code and Content-type and report 
it as well.

Note: getUrl paramemeter are now checked if they are valid for the 
requested protocol.

TODO: Make use of error reporting in approriate parts of the Core (eg UI 
parts in BE, admin panel in FE, ...)

Masi

PS: For readability the complete version of getUrl is attached.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_1364_v4.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080222/9ac37a02/attachment.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t3lib_div-getUrl.php
Type: application/x-php
Size: 5935 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080222/9ac37a02/attachment.bin 


More information about the TYPO3-team-core mailing list