Taffy
Taffy copied to clipboard
A PUT request with multipart/form-data is not properly processed
- Platform: Adobe ColdFusion 2016(,0,16,320445) - via CommandBox 5.2.0+00280 on Windows 10
- Java version: 1.8.0_271
- Taffy version: 3.2.0
Description of the bug:
When PUT-ing a resource while using multipart/form-data, the _body key is not present in the arguments struct. This is not the case when using POST.
Proof:

To be clear, _body is only intended to be passed as an argument when the input data is not recognizable or when it is something other than a MAP type (e.g. struct/object). For example, if you send a JSON array as the request body, Taffy wouldn't know how to handle this and would provide it to the appropriate resource as the _body argument.
However, if we make the assumption that the resource used in your screen shots is dumping the arguments scope (which I believe is what we had discussed in slack) then they illustrate a different problem that we should address. I don't currently recall any reason that we should not parse form inputs into params for a PUT request. It's been a while since I looked at this code but we might be making the assumption that PUT implies data will come in query params, which would be incorrect in this case.