Yaak Logo
Yaak
Feedback/Bug Report: Yaak Fails to Import Standard Chrome Multipart Form cURL Request

Bug Report: Yaak Fails to Import Standard Chrome Multipart Form cURL Request

xzxiaoshan ·2 months ago
ReleasedBug

Issue Description:
When importing a cURL command generated by Chrome for a multipart form submission with an attachment, Yaak fails to parse it correctly. The same cURL command works as expected in Postman.

Steps to Reproduce:

  1. Use Chrome DevTools to capture a multipart form submission with a file attachment.

  2. Copy the request as a cURL command.

  3. Attempt to import the cURL command into Yaak.

  4. Observe that Yaak does not properly recognize the multipart structure or file data.

Expected Behavior:
Yaak should correctly parse the multipart form data, including file attachments, similar to Postman's import functionality.

Actual Behavior:
Yaak fails to parse the request, likely due to improper handling of the --data-raw format with escaped boundary markers and multipart structure.

Additional Notes:
The cURL command uses --data-raw with escaped boundary markers ($'...' syntax), which may require special handling for multipart parsing. Postman correctly interprets this format, suggesting Yaak's cURL importer has a gap in multipart request support.

curl 'http://localhost:8080/system' \
  -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
  -H 'Accept-Language: zh-CN,zh;q=0.9' \
  -H 'Cache-Control: max-age=0' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryHwsXKi4rKA6P5VBd' \
  -H 'Origin: http://localhost:8080' \
  -H 'Referer: http://localhost:8080/system' \
  -H 'Sec-Fetch-Dest: document' \
  -H 'Sec-Fetch-Mode: navigate' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Sec-Fetch-User: ?1' \
  -H 'Upgrade-Insecure-Requests: 1' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw $'------WebKitFormBoundaryHwsXKi4rKA6P5VBd\r\nContent-Disposition: form-data; name="username"\r\n\r\njsgj\r\n------WebKitFormBoundaryHwsXKi4rKA6P5VBd\r\nContent-Disposition: form-data; name="password"\r\n\r\n654321\r\n------WebKitFormBoundaryHwsXKi4rKA6P5VBd\r\nContent-Disposition: form-data; name="captcha"; filename="副本制造业贴息(3).xlsx"\r\nContent-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\r\n\r\n\r\n------WebKitFormBoundaryHwsXKi4rKA6P5VBd--\r\n'

Windowsv2025.10.0-beta.4

Comments (3)

Sign in to leave a comment.

Gregory Schier
xzxiaoshan OP

The upgrade program confirmation has been resolved. I also provided feedback on some other issues. You can filter my content to take a look.

Gregory Schier
Type to search feedback...