[TYPO3-mvc] RFC #7153 Refactor the Dispatcher

Martin Kutschker masi-no at spam-typo3.org
Fri Jul 9 14:35:58 CEST 2010


Am 09.07.2010 13:37, schrieb Dennis Ahrens:
> Hi Franz,
> 
> Franz Koch wrote:
>> - Hardcoded headers in MVC_Web_Requesthandler
>>
>>> +    switch ($request->getFormat()) {
>>> +        case 'rss.xml' :
>>> +        case 'rss' :
>>> +            $response->setHeader('Content-Type', 'application/rss+xml');
>>> +            break;
>>> +        case 'atom.xml' :
>>> +        case 'atom' :
>>> +            $response->setHeader('Content-Type', 'application/atom+xml');
>>> +            break;
>>> +    }
>>
>> not sure if this is good. I think a more generic way (hooks?) need to be found for this - the
>> current approach seems like a quick and dirty solution.
> 
> I think it makes sense to switch the available Content-Types based on the Request Format inside the
> RequestHandler - all possible Response Content-Types that are handled by a special Request Type
> should be switched there - no need for a hook, because you can switch the header on the request
> object later on to fit your needs.

But this is IMHO not an issue that has to hold up this patch.

> 
>> - The Web_RequestHandler should not always return TRUE in method "canHandleRequest", so we should
>> backport the annotated class there, or implement some different check (like a check for TSFE).
> 
> Let's take a look at the FLOW3/Utility/Enviroment.php - I think we only need to make sure, that we
> have a Request from the outside with any GET/POST information.

Yes, something like that. Maybe with a check that it's not the CLI-ISAPI of PHP.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list