arc-electron
arc-electron copied to clipboard
Multipart form data - unpredictable results
- Application version: 17.0.9
- Operating System (Platform and Version): Windows 10 21H2 (x64)
Expected Behavior Multipart form data requests should send all of the selected parts, in the order that they appear.
Actual behavior In a multipart form data request:
- File parts without a name are not sent.
- The part name is not applied until I disable and enable the part. This also means that choosing a file and then setting the name will cause it to not be sent until disabled and enabled.
- Giving two parts the same name causes one of them to not be sent at all. (This is more an issue of lack of validation)
- Renaming a part to the same name as another, then changing the name of the other, causes one of them to not be sent.
- The parts are sent in the order that they were enabled, rather than the order in which they appear. It is not possible to control the order in any other way.
All of these issues occur "silently" - no clear warnings or errors. All issues persist even after closing and reopening ARC and/or choosing a request from the history.
To Reproduce
- Add file part, choose a file, do not set the part name. Send the request.
- Add file part, choose a file, then set the part name. Send the request.
- Add file part, set the part name to "a", choose a file. Add file part, set the part name to "a", choose a different file. Send the request.
- Add file part, set the part name to "c", choose a file. Add file part, set the part name to "b", choose a different file. Rename the first part to "b". Rename the second part to "c". Send the request.
- Add file part, set the part name to "a", choose a file. Add file part, set the part name to "b", choose a different file. Disable the first part, then enable the first part. Send the request.
Screenshots
Demonstration of scenario 4
Originally the second was named "c" and the third was named "b". I renamed the second to "b" and the third to "c".
This is what my server outputs (sanitized):
Content length is 1945781
Section 1 contains headers {"Content-Disposition": ["form-data; name=\"a\"; filename=\"____.xml\""], "Content-Type": ["text/xml"]}
Section 2 contains headers {"Content-Disposition": ["form-data; name=\"c\"; filename=\"____.pdf\""], "Content-Type": ["application/pdf"]}
POST /upload responded 200
If I disable and enable the first part, it is sent last.
This issue has been automatically marked as stale because it has not had recent activity and is not currently prioritized. It will be closed in a week if no further activity occurs :)