[TYPO3-50-general] Strange behavior of $this->SERVER in Utility\Environment

Christoph Blömer chbloemer at gmx.net
Sat Jan 24 03:53:58 CET 2009


Robert Lemke schrieb:
> Hi Christoph,
>
> Am 23.01.2009 um 05:17 schrieb Christoph Blömer:
>
>>> This is what I'm doing. I need to add some more REQUEST_METHOD to the
>>> Environment.
>
> Which ones? MOVE, COPY, SEARCH, LOCK, UNLOCK, PROPFIND, PROPPATCH, MKCOL?
>
> Please let's add them to the original class.
>
>>> So why is it not possible to read the $this->SERVER variable in the
>>> child class???
>
> Because the original Environment object has already be instantiated 
> elsewhere
> and the superglobal has been replace.
>
>> I just found out that if I comment out the line:
>> $_SERVER = new \F3\FLOW3\Utility\SuperGlobalReplacement('_SERVER', 
>> 'Please use the ' . __CLASS__ . ' object instead of accessing the 
>> superglobal directly.');
>>
>> The $this->SERVER variable is available in the child class of 
>> F3\FLOW3\Utility\Environment.
>> Is that a intended behavior?
>
> yes, because the content of $_SERVER is not sanitized.
>
> If there's really a need for extending the Environment class we can 
> make that possible.
> But I generally think that it's a bad idea in the first place.
I also need access to the following properties of the $_SERVER variable:
$_SERVER['HTTP_DEPTH']
$_SERVER["HTTP_TIMEOUT"]
$_SERVER['CONTENT_LENGTH']
$_SERVER['HTTP_IF']
$_SERVER['HTTP_RANGE']
$_SERVER["CONTENT_TYPE"]
$_SERVER["HTTP_LOCK_TOKEN"]
$_SERVER["HTTP_DESTINATION"]
$_SERVER["HTTP_OVERWRITE"]

Or is there a way to get access to the "content" of the $_SERVER 
variable like "getSERVERArguments()"?

Greetings
Christoph
>
> Cheers,
> robert
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-project-5_0-general mailing list
> TYPO3-project-5_0-general at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-5_0-general



More information about the TYPO3-project-5_0-general mailing list