Bug #25321
closedgetUrl crashes when trying to retrieve a big file
0%
Description
This happens very likely with linkvalidator. Just link to an external video with bigger size then memory_limit.
Normally you could just fetch headers using getUrl($url,2) but some sites are responding differently to HTTP HEAD than to HTTP GET (for example Amazon returns 405 Method not allowed).
There is currently no way to limit retrieval of the HTTP message.
For TYPO3 4.5 I suggest to extend to second parameter to getUrl($url,3) which does the same as 2, but uses get.
However, if curlUse is enable, still head is used. CURLOPT_HTTPGET = 1 retrieves the body even if CURLOPT_NOBODY is set.
This one needs to go to 4.5 in order to fix linkvalidator issues.
Set link to big external file.
Check link with linkvalidator.
See crash.
Use http://forge.typo3.org/issues/13680 linkval-cleanup_2.diff to test.
See http://forge.typo3.org/issues/13756 for some discussions.
git patch attached
(issue imported from #M17943)
Files
Updated by Philipp Gampe over 12 years ago
- Target version deleted (
0)
This one should be closed.
Linkvalidator is going to use t3lib_http_request
.
All other users are advice to use t3lib_http_request
too.
Updated by Thorsten Kahler over 12 years ago
- Status changed from New to Needs Feedback
- Assignee set to Philipp Gampe
- TYPO3 Version changed from 4.5 to 4.6
- PHP Version set to 5.3
- Complexity set to hard
Philipp Gampe wrote:
This one should be closed.
Linkvalidator is going to use
t3lib_http_request
.All other users are advice to use
t3lib_http_request
too.
Shouldn't this issue be moved to project:extension-linkvalidator then?
And: downloading (and handling) a file that's larger than memory_limit
IMHO is not a regular use case and so IMHO is not within the scope of t3lib_div::getUrl().
Updated by Philipp Gampe over 12 years ago
There are issues in linkvalidator already. e.g #13756
So this one can be closed.
Updated by Thorsten Kahler over 12 years ago
- Status changed from Needs Feedback to Rejected
Rejected as duplicate of #13756.