codeconsole commented on PR #16182:
URL: https://github.com/apache/grails-core/pull/16182#issuecomment-5363218894

   Superseded by #16183, which the discussion converged on — closing this in 
its favour.
   
   The short version of why: this PR kept browser forms working by generating 
two POST routes (`POST /books/$id` → update and `POST /books/$id/delete` → 
delete) so that no server-side method override was needed at all. #16183 keeps 
the first of those routes but reaches `delete` through `_method` resolved 
inside the dispatcher, which avoids adding a second URL to every resource.
   
   Two findings from this PR carry over and are worth preserving:
   
   - **#9926 was never actually fixed for `resources:` mappings.** 
`RestfulController` has declared `update: ['PUT', 'POST']` since 2016, but no 
route was ever generated to deliver a POST to `update`, so the permission has 
been unreachable. Both PRs add `POST /$controller/$id`; #16183 carries it.
   - **A startup failure new in 8.0**: 
`spring.mvc.hiddenmethod.filter.enabled=true` collides with Grails' 
identically-named bean and fails startup with a 
`BeanDefinitionOverrideException`. Fixed in #16183 too.
   
   The `FormTagLib` restructure here — reordering method resolution so the form 
action could be rewritten to `/books/$id/delete` — is not needed by the 
converged design, which never changes the form's action URL. That was the 
riskiest change in either branch, so avoiding it is a real gain.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to