[GH-ISSUE #1018] [BUG] Incorrect cURL from multipart/form Request #1013

Open
opened 2026-03-03 19:23:47 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (Oct 9, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1018

Originally assigned to: @NghiaTranUIT on GitHub.

Description

If we do "copy as cURL" from a multipart/form request, the output is incorrect.

For instance,

curl -v 'http://httpbin.org/anything' \
-X POST \
-H 'Content-Type: multipart/form-data; charset=utf-8; boundary=__X_PAW_BOUNDARY__' \
-H 'Authorization: ' \
-H 'Host: httpbin.org' \
-H 'Content-Length: 162' \
-H 'w: ' \
-H 'wqwefwfe: ' \
-H 'Connection: close' \
-H 'User-Agent: Paw/3.3.0 (Macintosh; OS X/11.5.2) GCDHTTPRequest' \
-d '--__X_PAW_BOUNDARY__
Content-Disposition: form-data; name="1"

2
--__X_PAW_BOUNDARY__
Content-Disposition: form-data; name="3"

4
--__X_PAW_BOUNDARY__--

We could not post a multipart/form with -d param. We have to use -F

Originally created by @NghiaTranUIT on GitHub (Oct 9, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1018 Originally assigned to: @NghiaTranUIT on GitHub. ### Description If we do "copy as cURL" from a multipart/form request, the output is incorrect. For instance, ``` curl -v 'http://httpbin.org/anything' \ -X POST \ -H 'Content-Type: multipart/form-data; charset=utf-8; boundary=__X_PAW_BOUNDARY__' \ -H 'Authorization: ' \ -H 'Host: httpbin.org' \ -H 'Content-Length: 162' \ -H 'w: ' \ -H 'wqwefwfe: ' \ -H 'Connection: close' \ -H 'User-Agent: Paw/3.3.0 (Macintosh; OS X/11.5.2) GCDHTTPRequest' \ -d '--__X_PAW_BOUNDARY__ Content-Disposition: form-data; name="1" 2 --__X_PAW_BOUNDARY__ Content-Disposition: form-data; name="3" 4 --__X_PAW_BOUNDARY__-- ``` We could not post a multipart/form with `-d` param. We have to use `-F`
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 11, 2021):

Done https://github.com/ProxymanApp/Proxyman/issues/1020#issuecomment-939763736 👍

<!-- gh-comment-id:939764083 --> @NghiaTranUIT commented on GitHub (Oct 11, 2021): Done https://github.com/ProxymanApp/Proxyman/issues/1020#issuecomment-939763736 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1013
No description provided.