Optimizing mapType
Optimizing mapType

When using RequestHandler component the code tries to guess the extension by checking the Accept header. The current code maps all the types sent as acceptable by the requester (usually browser) and just use the first. This is just a quicker solution where moving the order of the items on the array makes the code to reduce around 400 loops with in_array check inside for requests coming from the most common browsers (Chrome, Safari, Firefox, IE).

davidyell/cakephp,petteyg/cakephp,tenkoma/cakephp,davidyell/cakephp,CVO-Technologies/cakephp,cakephp/cakephp,garethellis36/cakephp,garethellis36/cakephp,thinkingmedia/cakephp,ndm2/cakephp,dakota/cakephp,CakeDC/cakephp,petteyg/cakephp,ionas/cakephp,garethellis36/cakephp,dakota/cakephp,jeffblack360/cakephp,cakephp-fr/cakephp,CakeDC/cakephp,CVO-Technologies/cakephp,ndm2/cakephp,ionas/cakephp,ADmad/cakephp,nrother/cakephp,berrygoudswaard/cakephp,HavokInspiration/cakephp,nrother/cakephp,tenkoma/cakephp,berrygoudswaard/cakephp,ndm2/cakephp,ADmad/cakephp,CakeDC/cakephp,ionas/cakephp,tenkoma/cakephp,tgr0ss/cakephp,thinkingmedia/cakephp,jeffblack360/cakephp,nrother/cakephp,cakephp/cakephp,elboletaire/cakephp,mvdriel/cakephp,tgr0ss/cakephp,thinkingmedia/cakephp,petteyg/cakephp,dakota/cakephp,mvdriel/cakephp,garethellis36/cakephp,mvdriel/cakephp,cakephp-fr/cakephp,davidyell/cakephp,cakephp/cakephp,ADmad/cakephp,CVO-Technologies/cakephp,dakota/cakephp,CakeDC/cakephp,elboletaire/cakephp,mvdriel/cakephp,ndm2/cakephp,HavokInspiration/cakephp,cakephp-fr/cakephp,ADmad/cakephp,HavokInspiration/cakephp,tgr0ss/cakephp,elboletaire/cakephp,petteyg/cakephp,jeffblack360/cakephp,berrygoudswaard/cakephp,cakephp/cakephp,tenkoma/cakephp