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

Christoph Blömer chbloemer at gmx.net
Fri Jan 23 18:07:22 CET 2009


Christoph Blömer schrieb:
> 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?
>>     
> I'm currently not sure about SEARCH, but the rest is fine. You can add them.
>   
SEARCH is fine too, its used with webdav and Microsoft Exchange somehow.
>> 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.
>>     
> Is Environment the only class which can not be extended?
> Is there any FLOW3 method or class which gives me the incoming headers 
> and bodies?
> Or can I just use fopen("php://input",r)?
>   
>> 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
>>     
>
> _______________________________________________
> 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