Skip to content

fix: preserve equals in curl form imports#9962

Open
immanuwell wants to merge 1 commit into
Kong:developfrom
immanuwell:fix/curl-form-import-equals
Open

fix: preserve equals in curl form imports#9962
immanuwell wants to merge 1 commit into
Kong:developfrom
immanuwell:fix/curl-form-import-equals

Conversation

@immanuwell
Copy link
Copy Markdown

Related: #9412, #9434, #9198

This is a small follow-up for cURL import.
-d style payloads were fixed already, but -F/--form was still kinda busted. The form parser used split('='), so multipart values and file paths got chopped after the first extra =.

Repro

  1. Create -> Import From cURL
  2. Paste curl -X POST https://example.com -F 'token=abc=def=='
  3. Or paste curl -X POST https://example.com -F 'file=@/tmp/a=b.txt'
  4. Import

Before

  • token becomes abc
  • file path becomes /tmp/a

After

  • token stays abc=def==
  • file path stays /tmp/a=b.txt

This is real-world enough, not some unicorn edge case. base64-ish fields and odd file names happen all the time.

Tests

  • added 2 regression tests for multipart text/file fields with extra =
  • npm test --silent -w packages/insomnia -- src/main/importers/importers/curl.test.ts
  • npm run type-check
  • npm test
  • npm run lint still reports existing warnings in untouched files, same as before

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 26, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@immanuwell immanuwell force-pushed the fix/curl-form-import-equals branch from ce05eb5 to 9d12d6e Compare May 26, 2026 15:11
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

Successfully merging this pull request may close these issues.

2 participants