codeconsole commented on PR #16149:
URL: https://github.com/apache/grails-core/pull/16149#issuecomment-5572456134
Thanks. Addressed the three observations in c8bbcb8.
**The unexercised forward actions** — kept and put to work rather than
dropped, since as you say they cover the P1b decision in a running container.
The forward now goes to the member URL instead of naming an action, so the
mappings route it and the response reports which method they matched on:
`delete` for a POST naming DELETE, `update` for the same POST without it.
Previously that behaviour was asserted only against a mock.
**The cross-controller `ALLOWED_METHODS_HANDLED` case** — added. A new
`RequestPathForwarderController` restricts nothing and forwards into
`RequestPathController.delete`, which is DELETE-only; the forward is admitted
because the first action recorded that it began handling the request. That is
the shape the rule exists for, since a controller cannot tell from itself
whether a later one will read the record.
**The `isAjax` multipart test** — written, then removed. It passed against
the direct `multipart?.getParameter('ajax')` read it was meant to catch, so the
branch is not reached under the unit-test harness and the test asserted
nothing. You marked it optional and noted `WebUtilsSpec` covers the tolerance,
which is where it stays; I would rather have no test than one that cannot fail.
`RequestPathSpec` is nine cases now, all passing, plus the spring-security,
controllers, url-mappings and web-common suites.
--
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]