[TYPO3-core] Fix bugtracker issue 3172: MIME type determination crashing (HEAD request)
Stanislas Rolland
stanislas.rolland at fructifor.ca
Wed Apr 12 20:04:20 CEST 2006
Bernhard Kraft a écrit :
>> - fputs($fp,'HEAD '.$getAdr.' HTTP/1.0\r\nHost:
>> '.$pathInfo['host'].'\r\n\r\n');
>> + fputs($fp,'HEAD '.$getAdr." HTTP/1.0\r\nHost:
>> ".$pathInfo['host']."\r\n\r\n");
>> while(!feof($fp)) {
>> $thePortion= fgets($fp,128);
>> if (eregi("(^Content-Type: )(.*)",trim($thePortion),
>> $reg)) {
>>
>
> alltogether +1 ... but -1 for the above.
>
> rather use
>
> $thePortion = t3lib_div::getURL($pathInfo['host'].$getAdr, 2);
>
> if we have an API we should use it ...
Indeed. However, in this case, we need only the header, we do not need
to get the whole file.
Stanislas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060412/d271b253/attachment.html
More information about the TYPO3-team-core
mailing list