-
Notifications
You must be signed in to change notification settings - Fork 280
Multipart not passing formdata to endpoint #786
Comments
@fidransky Thanks for reporting this! This is a bug. I was able to reproduce the problem. Steps to reproduce:
FORMAT: 1A
# Test Form Data API
# POST /data
+ Request (multipart/form-data;boundary=---BOUNDARY)
+ Body
---BOUNDARY
Content-Disposition: form-data; name="text"
Content-Type: text/plain
Hello
---BOUNDARY
Content-Disposition: form-data; name="json"; filename="filename.json"
Content-Type: application/json
{"test": 42}
---BOUNDARY--
+ Response 200 (application/json)
+ Body
{"test": "OK"}
I don't think there's any kind of test for sending multipart/form-data. So the first step to fix this would be to add a failing test for this. |
Same problem here, dredd just hangs on endpoint that POST multipart/form-data |
hey guys, any status update about this bug? I am not a dredd/node expert, but reading the request docs about multipart forms and dredd source code seems the issue is there. I also validate this problem creating a request page on https://requestb.in and sending a POST multipart/form to it. Dredd hangs as both guys said before. A workaround would be great until we not have a better solution. Thanks! |
Unfortunately, I can't think of an easy workaround just out of my head. If someone is keen to provide a failing test (above I provided steps to reproduce), it would speed up the fix. |
Also, it looks like this thing worked in previous versions. It would be helpful if someone could verify which version introduced the problem. I suspect v3.1.0. |
@honzajavorek can confirm that 3.0.0 works while the current one hangs |
Hi everybody,
Im using Dredd to test our Jersey-powered API and absolutely love it. However I cannot figure out how to send valid and complete multipart form data to a file upload endpoint we have using Dredd. Im pretty sure the endpoint works correctly since the application (AngularJS) works perfectly.
In my API blueprint, I have these lines (copied directly from Chrome):
The server side looks as following (for Java fans):
To me, it seems that Dredd does not pass the formdata correctly thus the server returns error 500.
Im using Dredd version v3.4.4 (Windows_NT 10.0.15063; x64).
Ive read lots of various how-tos and SO topics, including the official guide but Im still struggling with it. In case you need more information, feel free to ask.
Thanks
The text was updated successfully, but these errors were encountered: