[TYPO3-core] RFC: getURL fix for error cases and curl

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Tue Oct 17 16:10:08 CEST 2006


Ernesto Baschny [cron IT] schrieb:
> This is a SVN patch request.
> 
> Problem:
> When using "curl" with t3lib_div::getURL() and retrieving an URL that
> returns an 404, you get the 404 error-page back as "content", instead of
> a false that would indicate that there was an error in the transfer.
> 
> You can see the problem in "action" in this situation:
> 
> - configure a proxy and enable "curl" in the install tool
> - Delete all *.zip files in typo3temp
> - Go to "Ext.Manager" and to the "Translation handling"
> - Select some languages
> - "Update from repository"
> 
> You will get a couple of "ERR" "Unpacking the language pack failed".
> This is because it is trying to unpack the html-error message, you can
> see their contents in typo3temp after the errors.
> 
> Fix:
> The curl_setopt($ch, CURLOPT_FAILONERROR, 1) addition will make
> curl_exec return "false" which is what getURL currently does without
> curl on error situations. I am pretty sure this shouldn't break any
> existing application, except if we want to get the 404 content back
> (which would currently only work with curl anyway).

Is this in now? From your description it should be in TYPO3_4-0 too.

+1 (just a reminder as I gave it already on 7th August)

Masi



More information about the TYPO3-team-core mailing list