[TYPO3-core] Fix bugtracker issue 3172: MIME type determination crashing (HEAD request)

Bernhard Kraft kraftb at kraftb.at
Wed Apr 12 19:35:57 CEST 2006


Stanislas Rolland wrote:

> -			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 ...


greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------



More information about the TYPO3-team-core mailing list