Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A PUT request with multipart/form-data is not properly processed #405

Open
satauros opened this issue Feb 11, 2021 · 1 comment
Open

A PUT request with multipart/form-data is not properly processed #405

satauros opened this issue Feb 11, 2021 · 1 comment

Comments

@satauros
Copy link

  • 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:

image
image

@atuttle
Copy link
Owner

atuttle commented Feb 18, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants