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

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Jun 7 16:07:08 CEST 2006


Michael Stucki schrieb:
> Hi Martin Kutschker wrote:
> 
> 
>>>Description: MIME type determination times out due to incorrect HEAD
>>>request (incorrect use of single quotes where double quoting is
>>>required).
>>
>>Looking again at the fix I see that the code for htmlmail is correct.
>>But there are issues in getURL.
>>
>>headersOnly is ignored for CURL (the content should be trimmed in the
>>CURL section of the code) and the standard fgets() part could use HEAD
>>instead of GET.
> 
> 
> Right, getURL cannot fetch headers if CURL is used. You could extend the
> function, but unfortunately the documentation for curl_* is not so great in
> PHP: http://ch.php.net/curl

My addition to Dmitri's last version of getURL  allows to fetch the headers 
only with cURL (see my "pageNotFoundHandling" from 2nd of June).

The CURL options to be added:

curl_setopt($ch, CURLOPT_NOBODY, $includeHeader==2 ? 1 : 0);

Masi



More information about the TYPO3-team-core mailing list