[TYPO3-core] RFC: pageNotFound_handling HTTP status fix

Martin Kutschker Martin.Kutschker at blackbox.net
Tue Apr 25 12:58:04 CEST 2006


Dmitry Dulepov <dima at spamcop.net> writes on 
Tue, 25 Apr 2006 10:53:49 +0200 (METDST):

> Hi!
> 
> Martin Kutschker wrote:
> 
> > This patch enhances t3lib_div::getURL() with request headers.
> 
> cUrl has specific options for some headers, namely referrer and user
> agent. Shouldn't headers be parsed and corresponding headers set via
> specific cUrl options? I do not know the answer, just asking. May be
> cUrl has specific handling for them?


I don't know either. But it looks like those specific options are either convenenience options or were the first to be added to the API. Later (perhaps) they added the general header option to avoid adding every single possible HTTP header.

I saw no real reason to use the specific header options.


> Also my patch had a mistake:
> $content = fread($fd, 4096);
> should be:
> $content .= fread($fd, 4096);


I only noticed while creating my own.

I suggest we use my patch because with it you can also set cookies. This might be of interest in another context.

Masi




More information about the TYPO3-team-core mailing list