hk2166 commented on PR #16786: URL: https://github.com/apache/grails-core/pull/16786#issuecomment-6489236184
All three points are addressed in d7f3923ce9. - **The dispatcher's text fields**: before the copy takes the place of a multipart request an attribute holds, it adds that request's parameters to its own, keeping the request's value for a name both have, as `params` merges them (detail in the inline reply). - **A later task given a wrapper**: each task keeps the request it was given. The completion is shared, and one copy is taken of each request the tasks were given, sharing the attributes and the body (detail in the inline reply). - **A parameter map that throws**: the parameters are read the way `WebUtils.readParameterMap` reads them, so the rest of the request is copied either way. A multipart request that cannot be parsed has no parameters, and any other failure is thrown when a task reads them (detail in the inline reply). Testing the second point turned up a related problem. When a wrapper is written in Groovy, the task's request implemented `GroovyObject`, so Groovy dispatched calls through the wrapper's meta class. Calling a servlet method the wrapper overrides, such as `getParameter`, from Groovy code then failed with an `IllegalArgumentException`. The task's request now leaves `GroovyObject` out. On the previous head, the five new tests fail. The text-field, unreadable-multipart and unreadable-parameters tests fail on the missing fields or on the dropped copy. The own-request test fails on `GroovyObject`, and with only that problem fixed it still fails on the missing form field. The Groovy test fails on `getParameter`. With this commit, the module's 62 tests pass, and so do the pubsub demo's 18 integration tests. Checkstyle, CodeNarc, PMD and the repository conventions are clean, and the guide builds with the updated paragraph. -- 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]
