[TYPO3-v4] getUrl issues - linkvalidator

Philipp Gampe typo3.lists at philippgampe.info
Tue Mar 15 00:43:39 CET 2011


Hi all,

During development of linkvalidator some issues popped up with getUrl.

First is #M16925 which creates a wrong HTTP request if no path is given 
(http://www.example.org). A solution is pending 
https://review.typo3.org/1138

The second is a crashing getUrl if used with an URL where content exceeds 
memory limit. This is very likely if you link to an external video. [1]

Unfortunately we can not use HEAD, because some servers like amazon.com 
behave differently on HEAD compared to GET. This is a poor implementation, 
but RFCs only say that HEAD _SHOULD_ behave as GET.

A possible solution would be to extend the second parameter to get headers 
using GET. This would be a one liner actually, but has another drawback:
If you use curl, there is no way to only retrieve headers without the body, 
but still using GET. You either get the full response or you use HEAD.
An experimental patch is at [2]. You may try with Introduction Package and 
v2 from [3].

Additionally, if you set curlUse, additional headers are ignored.

The question is now what to do in 4.5 branch and how to solve the big file 
problem.
Some more information are available at [1].

[1] http://forge.typo3.org/issues/13756 - External links to big files crash 
TYPO3
[2] http://bugs.typo3.org/view.php?id=17943 - getUrl crashes when trying to 
retrieve a big file
[3] http://forge.typo3.org/issues/13680

Best regards
-- 
Philipp Gampe


More information about the TYPO3-project-v4 mailing list