[TYPO3-core] RFC: pageNotFound_handling HTTP status fix

Martin Kutschker Martin.Kutschker at blackbox.net
Mon Apr 24 15:03:53 CEST 2006


Dmitry Dulepov <dima at spamcop.net> writes on 
Mon, 24 Apr 2006 13:35:03 +0200 (METDST):

>
> > Why did you add yet another getURL function?
> 
> It is explained in the phpDoc comment to the new function ;)


Oh, you really bothered to write a meaningful comment :-)

Shame on me,


> > b) yet another way to retrieve a URL: stream_context_create
> 
> Nope, this function only creates context to supply additional
> information to fopen.


Another else clause is a new way.

But I understand now that it's the same stuff as for cURL.

I suggest we modify t3lib_div::getURL() to take a third parameter: an array of HTTP headers.

This array can be used with cURL via CURLOPT_HTTPHEADER (also an array of headers) and via the stream context http[header] (a simple join() of the headers array).


> > The part where a relative URL is resoved can be easily added around
> > line 1298, no need for a new method.
> 
> Did not understand this...


I mean you don't have to bother to write a new method in case you can use t3lib_div::getURL just for the resolving of the relative URL.

Masi 



More information about the TYPO3-team-core mailing list