[TYPO3-core] Reminder: : pageNotFound_handling HTTP status fix
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Fri Jun 23 20:34:51 CEST 2006
Dmitry Dulepov schrieb:
> Hi all!
>
> Version 3 of the patch is attached. I added <base> handling and Martin's
> additional code for curl.
You have again placed the check for function_exists('file_get_contents')
wrongly.
The check must be done of course before using fopen/fread as last resort:
elseif (function_exists('file_get_contents')) {
$content = @file_get_contents($url);
}
else if (false !== ($fd = @fopen($url, 'rb'))) {
$content = '';
while (!feof($fd)) {
$content .= fread($fd, 4096);
}
fclose($fd);
}
My last version had this already corrected. Which corrected also this
problem:
'Referer: ' . t3lib_div::getIndpEnv('HTTP_USER_AGENT'),
'User-agent: ' . t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')
Please have a look at my patch and revisit yours. I think it's easier if
you simply enhance mine with the new base stuff.
BTW, the indenting is broken again (also fixed by me). Use tabs not spaces!
Masi
More information about the TYPO3-team-core
mailing list