[TYPO3-mvc] RFC #7153 Refactor the Dispatcher
Dennis Ahrens
dennis.ahrens at googlemail.com
Fri Jul 9 13:37:04 CEST 2010
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.
> - 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.
> Some minor issues:
> --------------------------------
> - some phpdoc comments still say FLOW3
I'll start a search/replace session later on :)
regards
Dennis
More information about the TYPO3-project-typo3v4mvc
mailing list